mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Expand hatching potions test
This commit is contained in:
@@ -1,20 +1,29 @@
|
|||||||
import {
|
import {
|
||||||
expectValidTranslationString
|
expectValidTranslationString,
|
||||||
|
describeEachItem
|
||||||
} from '../helpers/content.helper';
|
} from '../helpers/content.helper';
|
||||||
|
|
||||||
import { all as potions } from '../../common/script/src/content/hatching-potions';
|
|
||||||
import {each} from 'lodash';
|
import {each} from 'lodash';
|
||||||
|
|
||||||
describe('Hatching Potion Locales', () => {
|
import { all as potions } from '../../common/script/src/content/hatching-potions';
|
||||||
each(potions, (potion, key) => {
|
|
||||||
describe(`${key} Potion`, () => {
|
|
||||||
it('has a valid text attribute', () => {
|
|
||||||
expectValidTranslationString(potion.text);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has a valid notes attribute', () => {
|
describeEachItem('Hatching Potions', potions, (potion, key) => {
|
||||||
expectValidTranslationString(potion.notes);
|
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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user