habitica/test/content/eggs.js

37 lines
864 B
JavaScript
Raw Normal View History

import {
2015-10-03 16:42:23 +00:00
expectValidTranslationString,
describeEachItem
} from '../helpers/content.helper';
2015-09-29 13:07:07 +00:00
import {allEggs} from '../../common/script/src/content/eggs';
2015-10-03 16:42:23 +00:00
describeEachItem('Eggs', allEggs, (egg, key) => {
it('has a key attribute', () => {
expect(egg.key).to.eql(key);
});
it('has a valid text attribute', () => {
expectValidTranslationString(egg.text);
});
it('has a valid mountText attribute', () => {
expectValidTranslationString(egg.mountText);
});
it('has a valid notes attribute', () => {
expectValidTranslationString(egg.notes);
});
it('has a valid ajective attribute', () => {
expectValidTranslationString(egg.adjective);
2015-09-29 13:07:07 +00:00
});
2015-10-03 16:42:23 +00:00
it('has a canBuy function', () => {
expect(egg.canBuy).to.be.a('function');
});
it('has a value attribute', () => {
expect(egg.value).to.be.greaterThan(0);
});
});