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:
@@ -1,10 +1,10 @@
|
||||
import { v4 as generateUUID } from 'uuid';
|
||||
import {
|
||||
generateUser,
|
||||
translate as t,
|
||||
server,
|
||||
sleep,
|
||||
} from '../../../../helpers/api-integration/v3';
|
||||
import { v4 as generateUUID } from 'uuid';
|
||||
|
||||
describe('POST /user/hatch/:egg/:hatchingPotion', () => {
|
||||
let user;
|
||||
@@ -20,7 +20,7 @@ describe('POST /user/hatch/:egg/:hatchingPotion', () => {
|
||||
'items.eggs.Wolf': 1,
|
||||
'items.hatchingPotions.Base': 1,
|
||||
});
|
||||
let res = await user.post('/user/hatch/Wolf/Base');
|
||||
const res = await user.post('/user/hatch/Wolf/Base');
|
||||
await user.sync();
|
||||
expect(user.items.pets['Wolf-Base']).to.equal(5);
|
||||
expect(user.items.eggs.Wolf).to.equal(0);
|
||||
@@ -42,7 +42,7 @@ describe('POST /user/hatch/:egg/:hatchingPotion', () => {
|
||||
});
|
||||
|
||||
it('sends user activity webhook when a new pet is hatched', async () => {
|
||||
let uuid = generateUUID();
|
||||
const uuid = generateUUID();
|
||||
|
||||
await user.post('/user/webhook', {
|
||||
url: `http://localhost:${server.port}/webhooks/${uuid}`,
|
||||
@@ -57,11 +57,11 @@ describe('POST /user/hatch/:egg/:hatchingPotion', () => {
|
||||
'items.eggs.Wolf': 1,
|
||||
'items.hatchingPotions.Base': 1,
|
||||
});
|
||||
let res = await user.post('/user/hatch/Wolf/Base');
|
||||
const res = await user.post('/user/hatch/Wolf/Base');
|
||||
|
||||
await sleep();
|
||||
|
||||
let body = server.getWebhookData(uuid);
|
||||
const body = server.getWebhookData(uuid);
|
||||
|
||||
expect(body.type).to.eql('petHatched');
|
||||
expect(body.pet).to.eql('Wolf-Base');
|
||||
|
||||
Reference in New Issue
Block a user