mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Increase converage around egg content
This commit is contained in:
@@ -1,17 +1,23 @@
|
|||||||
import {
|
import {
|
||||||
expectValidTranslationString
|
expectValidTranslationString,
|
||||||
|
describeEachItem
|
||||||
} from '../helpers/content.helper';
|
} from '../helpers/content.helper';
|
||||||
|
|
||||||
import {allEggs} from '../../common/script/src/content/eggs';
|
import {allEggs} from '../../common/script/src/content/eggs';
|
||||||
import {each} from 'lodash';
|
|
||||||
|
|
||||||
describe('Egg Locales', () => {
|
describeEachItem('Eggs', allEggs, (egg, key) => {
|
||||||
each(allEggs, (egg, key) => {
|
it('has a key attribute', () => {
|
||||||
describe(`${key} Egg`, () => {
|
expect(egg.key).to.eql(key);
|
||||||
|
});
|
||||||
|
|
||||||
it('has a valid text attribute', () => {
|
it('has a valid text attribute', () => {
|
||||||
expectValidTranslationString(egg.text);
|
expectValidTranslationString(egg.text);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('has a valid mountText attribute', () => {
|
||||||
|
expectValidTranslationString(egg.mountText);
|
||||||
|
});
|
||||||
|
|
||||||
it('has a valid notes attribute', () => {
|
it('has a valid notes attribute', () => {
|
||||||
expectValidTranslationString(egg.notes);
|
expectValidTranslationString(egg.notes);
|
||||||
});
|
});
|
||||||
@@ -19,7 +25,12 @@ describe('Egg Locales', () => {
|
|||||||
it('has a valid ajective attribute', () => {
|
it('has a valid ajective attribute', () => {
|
||||||
expectValidTranslationString(egg.adjective);
|
expectValidTranslationString(egg.adjective);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
});
|
it('has a canBuy function', () => {
|
||||||
|
expect(egg.canBuy).to.be.a('function');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('has a value attribute', () => {
|
||||||
|
expect(egg.value).to.be.greaterThan(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user