mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +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
32 lines
1.0 KiB
JavaScript
32 lines
1.0 KiB
JavaScript
import {
|
|
each,
|
|
} from 'lodash';
|
|
import {
|
|
expectValidTranslationString,
|
|
} from '../helpers/content.helper';
|
|
|
|
import hatchingPotions from '../../website/common/script/content/hatching-potions';
|
|
|
|
describe('hatchingPotions', () => {
|
|
describe('all', () => {
|
|
it('is a combination of drop and premium potions', () => {
|
|
let dropNumber = Object.keys(hatchingPotions.drops).length;
|
|
let premiumNumber = Object.keys(hatchingPotions.premium).length;
|
|
let allNumber = Object.keys(hatchingPotions.all).length;
|
|
|
|
expect(allNumber).to.be.greaterThan(0);
|
|
expect(allNumber).to.equal(dropNumber + premiumNumber);
|
|
});
|
|
|
|
it('contains basic information about each potion', () => {
|
|
each(hatchingPotions.all, (potion, key) => {
|
|
expectValidTranslationString(potion.text);
|
|
expectValidTranslationString(potion.notes);
|
|
expect(potion.canBuy).to.be.a('function');
|
|
expect(potion.value).to.be.a('number');
|
|
expect(potion.key).to.equal(key);
|
|
});
|
|
});
|
|
});
|
|
});
|