diff --git a/test/content/hatching-potions.js b/test/content/hatching-potions.js index 4c1ad41f7a..c0b98980f6 100644 --- a/test/content/hatching-potions.js +++ b/test/content/hatching-potions.js @@ -1,20 +1,29 @@ import { - expectValidTranslationString + expectValidTranslationString, + describeEachItem } from '../helpers/content.helper'; - -import { all as potions } from '../../common/script/src/content/hatching-potions'; import {each} from 'lodash'; -describe('Hatching Potion Locales', () => { - each(potions, (potion, key) => { - describe(`${key} Potion`, () => { - it('has a valid text attribute', () => { - expectValidTranslationString(potion.text); - }); +import { all as potions } from '../../common/script/src/content/hatching-potions'; - it('has a valid notes attribute', () => { - expectValidTranslationString(potion.notes); - }); - }); +describeEachItem('Hatching Potions', potions, (potion, key) => { + it('has a valid key', () => { + expect(potion.key).to.eql(key); + }); + + it('has a canBuy function', () => { + expect(potion.canBuy).to.be.a('function'); + }); + + it('has a valid text attribute', () => { + expectValidTranslationString(potion.text); + }); + + it('has a valid notes attribute', () => { + expectValidTranslationString(potion.notes); + }); + + it('has a valid value', () => { + expect(potion.value).to.be.greaterThan(0); }); });