mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-13 12:47:28 +01:00
* Add october background * Add armoire * Add subscriber gear * add new pet * improve quest tests * Fixes from gear switchup * use new sprite system for quest images * fixes * fix quest image alignment * add missing string * fix(style): lint warnings and typo --------- Co-authored-by: Phillip Thelen <phillip@habitica.com> Co-authored-by: Sabe Jones <sabe@habitica.com>
43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
import {
|
|
each,
|
|
} from 'lodash';
|
|
import {
|
|
expectValidTranslationString,
|
|
} from '../helpers/content.helper';
|
|
|
|
import { quests } from '../../website/common/script/content/quests';
|
|
|
|
describe('quests', () => {
|
|
let clock;
|
|
|
|
afterEach(() => {
|
|
if (clock) {
|
|
clock.restore();
|
|
}
|
|
});
|
|
|
|
it('contains basic information about each quest', () => {
|
|
each(quests, (quest, key) => {
|
|
expectValidTranslationString(quest.text);
|
|
expectValidTranslationString(quest.notes);
|
|
expectValidTranslationString(quest.completion);
|
|
expect(quest.key, key).to.equal(key);
|
|
expect(quest.category, key).to.be.a('string');
|
|
if (quest.boss) {
|
|
expectValidTranslationString(quest.boss.name);
|
|
expect(quest.boss.hp, key).to.be.a('number');
|
|
expect(quest.boss.str, key).to.be.a('number');
|
|
}
|
|
expect(quest.drop).to.be.an('object');
|
|
expect(quest.drop.gp, key).to.be.a('number');
|
|
expect(quest.drop.exp, key).to.be.a('number');
|
|
if (quest.drop.items) {
|
|
quest.drop.items.forEach(drop => {
|
|
expectValidTranslationString(drop.text);
|
|
expect(drop.type, key).to.exist;
|
|
});
|
|
}
|
|
});
|
|
});
|
|
});
|