mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 13:47:33 +01:00
* Re-organize common folder * fix: Correct paths in tests * fix: move new content to proper folder * chore: Move audio folder to assets * Move sprites to sprites assets directory * Move css sprites to assets directory * Split out readmes for common code and sprites * Move images to assets directory * Move destinatin of shared browserified file * remove unused file * move compiled js to client-old * Fix karma tests * fix: Correct paths for sprites
34 lines
1.0 KiB
JavaScript
34 lines
1.0 KiB
JavaScript
import {
|
|
each,
|
|
} from 'lodash';
|
|
import {
|
|
expectValidTranslationString,
|
|
} from '../helpers/content.helper';
|
|
|
|
import eggs from '../../website/common/script/content/eggs';
|
|
|
|
describe('eggs', () => {
|
|
describe('all', () => {
|
|
it('is a combination of drop and quest eggs', () => {
|
|
let dropNumber = Object.keys(eggs.drops).length;
|
|
let questNumber = Object.keys(eggs.quests).length;
|
|
let allNumber = Object.keys(eggs.all).length;
|
|
|
|
expect(allNumber).to.be.greaterThan(0);
|
|
expect(allNumber).to.equal(dropNumber + questNumber);
|
|
});
|
|
|
|
it('contains basic information about each egg', () => {
|
|
each(eggs.all, (egg, key) => {
|
|
expectValidTranslationString(egg.text);
|
|
expectValidTranslationString(egg.adjective);
|
|
expectValidTranslationString(egg.mountText);
|
|
expectValidTranslationString(egg.notes);
|
|
expect(egg.canBuy).to.be.a('function');
|
|
expect(egg.value).to.be.a('number');
|
|
expect(egg.key).to.equal(key);
|
|
});
|
|
});
|
|
});
|
|
});
|