User:LVL/SandboxGive feedback
< User:LVL
ItemData Module Tests (Pre-Deployment Check)
get_cost
- **Valid item:** 3,200
- (Expected: "3,200")
- **Valid item with weird casing:** Cannot format non-number value.
- (Expected: "3,200")
- **Valid item with whitespace:** Cannot format non-number value.
- (Expected: "3,200")
- **Invalid item:** Cannot format non-number value.
- (Expected: A red "Item Not Found" error)
- **No item:** Cannot format non-number value.
- (Expected: A red "Item Not Found" error)
get_type
- **Weapon:** Weapon
- (Expected: "Weapon" or its localized equivalent)
- **Armor:** Vitality
- (Expected: "Armor" or its localized equivalent)
- **Tech:** Spirit
- (Expected: "Tech" or its localized equivalent)
is_active
- **Passive item:** false
- (Expected: "false")
- **Active item (Toggle):** true
- (Expected: "true")
- **Active item (InstantCast):** true
- (Expected: "true")
get_prop
- **Simple property:** 3
- (Expected: "3")
- **Table property (ShopFilters):** ClipSize, WeaponDamage
- (Expected: "ClipSize, WeaponDamage")
- **Property of a disabled item:** Item Not Found.
- (Expected: "30")
get_codename
- **Get codename for "Refresher":** upgrade_ability_refresher
- (Expected: "upgrade_refresher")
- **Get codename for "Witchmail":** upgrade_absorbing_armor
- (Expected: "upgrade_absorbing_armor")
get_component_name
- **Item with components:** Slowing Hex
- (Expected: The name of the item with codename "upgrade_containment". This will be blank if that item has no name.)
- **Item without components:**
- (Expected: Blank)
get_scalar (Testing Current Data)
Note: This confirms the module correctly handles missing `SpiritScaling` data in the current JSON.
- **Call for "Torment Pulse":** Script error: The function "get_scalar" does not exist.
- (Expected: A red error message like "SpiritScaling data not found for "Torment Pulse"")
get_headcount
- **Total enabled items:** 0
- (Expected: A number representing the total count of enabled items with names in your full JSON.)
Integration Test (Using a common template)
- Transcluding a key template with a real, enabled item:
- Transcluding with a disabled item:
Warning: Display title "" overrides earlier display title "Witchmail".
DEBUGGING Ablative Coat
Script error: The function "debug_lookup" does not exist.
