Files
habitica/test/content/hatching-potions.test.js
Phillip Thelen 12d38fa813 fix content tests
2024-06-19 17:45:01 +02:00

39 lines
863 B
JavaScript

import {
each,
} from 'lodash';
import {
expectValidTranslationString,
} from '../helpers/content.helper';
import { all } from '../../website/common/script/content/hatching-potions';
describe('hatchingPotions', () => {
let clock;
afterEach(() => {
if (clock) {
clock.restore();
}
});
const potionTypes = [
'drops',
'quests',
'premium',
'wacky',
];
potionTypes.forEach(potionType => {
describe(potionType, () => {
it('contains basic information about each potion', () => {
each(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);
});
});
});
});
});