fix test lint

This commit is contained in:
Matteo Pagliazzi
2019-10-08 20:45:38 +02:00
parent e37f4467f8
commit 85fb5f33aa
367 changed files with 6635 additions and 6080 deletions

View File

@@ -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');