diff --git a/test/content/gear.js b/test/content/gear.js index db9e1bd064..fa737e4640 100644 --- a/test/content/gear.js +++ b/test/content/gear.js @@ -1,3 +1,3 @@ -describe('Gear Locales', () => { +describe('Gear', () => { runTestsInDirectory('gear'); }); diff --git a/test/content/gear/armor.js b/test/content/gear/armor.js index 301d49e4c9..28ec7f8401 100644 --- a/test/content/gear/armor.js +++ b/test/content/gear/armor.js @@ -1,17 +1,40 @@ -import armor from '../../../common/script/src/content/gear/armor'; +import {tree as allGear} from '../../../common/script/src/content/gear'; import {each} from 'lodash'; -describe('Armor', () => { - each(armor, (set) => { - each(set, (gear, key) => { - describe(`${key} Armor`, () => { - it('has a valid text attribute', () => { - expectValidTranslationString(gear.text); - }); +describeEachItem('Armor', allGear.armor, (set, key) => { + each(set, (gear, key) => { + describe(`${key} Armor`, () => { - it('has a valid notes attribute', () => { - expectValidTranslationString(gear.notes); - }); + it('has a value attribute', () => { + expect(gear.value).to.be.at.least(0); + }); + + it('has a valid con attribute', () => { + expect(gear.con).to.be.at.least(0); + }); + + it('has a valid int attribute', () => { + expect(gear.int).to.be.at.least(0); + }); + + it('has a valid per attribute', () => { + expect(gear.per).to.be.at.least(0); + }); + + it('has a valid str attribute', () => { + expect(gear.str).to.be.at.least(0); + }); + + it('has a canBy function', () => { + expect(gear.canBuy).to.be.a('function'); + }); + + it('has a valid text attribute', () => { + expectValidTranslationString(gear.text); + }); + + it('has a valid notes attribute', () => { + expectValidTranslationString(gear.notes); }); }); });