Expand hatching potions test

This commit is contained in:
Blade Barringer
2015-10-03 11:08:03 -05:00
parent 95a17f6fbb
commit 7e080d5423

View File

@@ -1,13 +1,20 @@
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`, () => {
import { all as potions } from '../../common/script/src/content/hatching-potions';
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);
});
@@ -15,6 +22,8 @@ describe('Hatching Potion Locales', () => {
it('has a valid notes attribute', () => {
expectValidTranslationString(potion.notes);
});
});
it('has a valid value', () => {
expect(potion.value).to.be.greaterThan(0);
});
});