mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
fix test lint
This commit is contained in:
@@ -15,7 +15,7 @@ describe('shared.ops.openMysteryItem', () => {
|
||||
user = generateUser();
|
||||
});
|
||||
|
||||
it('returns error when item key is empty', (done) => {
|
||||
it('returns error when item key is empty', done => {
|
||||
try {
|
||||
openMysteryItem(user);
|
||||
} catch (err) {
|
||||
@@ -26,17 +26,17 @@ describe('shared.ops.openMysteryItem', () => {
|
||||
});
|
||||
|
||||
it('opens mystery item', () => {
|
||||
let mysteryItemKey = 'eyewear_special_summerRogue';
|
||||
const mysteryItemKey = 'eyewear_special_summerRogue';
|
||||
|
||||
user.purchased.plan.mysteryItems = [mysteryItemKey];
|
||||
user.notifications.push({type: 'NEW_MYSTERY_ITEMS', data: {items: [mysteryItemKey]}});
|
||||
user.notifications.push({ type: 'NEW_MYSTERY_ITEMS', data: { items: [mysteryItemKey] } });
|
||||
expect(user.notifications.length).to.equal(1);
|
||||
|
||||
let [data, message] = openMysteryItem(user);
|
||||
const [data, message] = openMysteryItem(user);
|
||||
|
||||
expect(user.items.gear.owned[mysteryItemKey]).to.be.true;
|
||||
expect(message).to.equal(i18n.t('mysteryItemOpened'));
|
||||
let item = _.cloneDeep(content.gear.flat[mysteryItemKey]);
|
||||
const item = _.cloneDeep(content.gear.flat[mysteryItemKey]);
|
||||
item.text = content.gear.flat[mysteryItemKey].text();
|
||||
expect(data).to.eql(item);
|
||||
expect(user.notifications.length).to.equal(0);
|
||||
|
||||
Reference in New Issue
Block a user