2016-09-10 18:37:10 +00:00
|
|
|
import {
|
|
|
|
|
each,
|
|
|
|
|
} from 'lodash';
|
|
|
|
|
import {
|
|
|
|
|
expectValidTranslationString,
|
|
|
|
|
} from '../helpers/content.helper';
|
|
|
|
|
|
2024-06-19 15:45:01 +00:00
|
|
|
import { all } from '../../website/common/script/content/hatching-potions';
|
2016-09-10 18:37:10 +00:00
|
|
|
|
2019-10-08 18:45:38 +00:00
|
|
|
describe('hatchingPotions', () => {
|
2024-06-11 16:54:39 +00:00
|
|
|
let clock;
|
2016-09-10 18:37:10 +00:00
|
|
|
|
2024-06-11 16:54:39 +00:00
|
|
|
afterEach(() => {
|
|
|
|
|
if (clock) {
|
|
|
|
|
clock.restore();
|
|
|
|
|
}
|
|
|
|
|
});
|
2016-09-10 18:37:10 +00:00
|
|
|
|
2024-06-11 16:54:39 +00:00
|
|
|
const potionTypes = [
|
|
|
|
|
'drops',
|
|
|
|
|
'quests',
|
|
|
|
|
'premium',
|
|
|
|
|
'wacky',
|
|
|
|
|
];
|
|
|
|
|
potionTypes.forEach(potionType => {
|
|
|
|
|
describe(potionType, () => {
|
|
|
|
|
it('contains basic information about each potion', () => {
|
2024-06-19 15:30:29 +00:00
|
|
|
each(all, (potion, key) => {
|
2024-06-11 16:54:39 +00:00
|
|
|
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);
|
|
|
|
|
});
|
2016-09-10 18:37:10 +00:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|