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,5 +1,6 @@
/* eslint-disable camelcase */
import { v4 as generateUUID } from 'uuid';
import {
generateUser,
translate as t,
@@ -7,7 +8,6 @@ import {
sleep,
} from '../../../../helpers/api-integration/v3';
import content from '../../../../../website/common/script/content';
import { v4 as generateUUID } from 'uuid';
describe('POST /user/feed/:pet/:food', () => {
let user;
@@ -24,10 +24,10 @@ describe('POST /user/feed/:pet/:food', () => {
'items.food.Milk': 2,
});
let food = content.food.Milk;
let pet = content.petInfo['Wolf-Base'];
const food = content.food.Milk;
const pet = content.petInfo['Wolf-Base'];
let res = await user.post('/user/feed/Wolf-Base/Milk');
const res = await user.post('/user/feed/Wolf-Base/Milk');
await user.sync();
expect(res).to.eql({
data: user.items.pets['Wolf-Base'],
@@ -51,7 +51,7 @@ describe('POST /user/feed/:pet/:food', () => {
});
it('sends user activity webhook when a new mount is raised', async () => {
let uuid = generateUUID();
const uuid = generateUUID();
await user.post('/user/webhook', {
url: `http://localhost:${server.port}/webhooks/${uuid}`,
@@ -66,11 +66,11 @@ describe('POST /user/feed/:pet/:food', () => {
'items.pets.Wolf-Base': 49,
'items.food.Milk': 2,
});
let res = await user.post('/user/feed/Wolf-Base/Milk');
const res = await user.post('/user/feed/Wolf-Base/Milk');
await sleep();
let body = server.getWebhookData(uuid);
const body = server.getWebhookData(uuid);
expect(body.type).to.eql('mountRaised');
expect(body.pet).to.eql('Wolf-Base');