mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 23:42:12 +00:00
Update food tests
This commit is contained in:
parent
7e080d5423
commit
b82123e1a2
1 changed files with 22 additions and 13 deletions
|
|
@ -1,20 +1,29 @@
|
|||
import {
|
||||
expectValidTranslationString
|
||||
expectValidTranslationString,
|
||||
describeEachItem
|
||||
} from '../helpers/content.helper';
|
||||
|
||||
import allFood from '../../common/script/src/content/food';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Food Locales', () => {
|
||||
each(allFood, (food, key) => {
|
||||
describe(`${key} Food`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(food.text);
|
||||
});
|
||||
import allFood from '../../common/script/src/content/food';
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(food.notes);
|
||||
});
|
||||
});
|
||||
describeEachItem('Food', allFood, (food, key) => {
|
||||
it('has a valid key', () => {
|
||||
expect(food.key).to.eql(key);
|
||||
});
|
||||
|
||||
it('has a valid value attribute', () => {
|
||||
expect(food.value).to.be.greaterThan(0);
|
||||
});
|
||||
|
||||
it('has a canBuy function', () => {
|
||||
expect(food.canBuy).to.be.a('function');
|
||||
});
|
||||
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(food.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(food.notes);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue