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

@@ -5,7 +5,7 @@ import {
} from '../../../../helpers/api-integration/v3';
let user;
let endpoint = '/user/custom-day-start';
const endpoint = '/user/custom-day-start';
describe('POST /user/custom-day-start', () => {
beforeEach(async () => {
@@ -22,9 +22,9 @@ describe('POST /user/custom-day-start', () => {
});
it('sets lastCron to the current time to prevent an unexpected cron', async () => {
let oldCron = moment().subtract(7, 'hours');
const oldCron = moment().subtract(7, 'hours');
await user.update({lastCron: oldCron});
await user.update({ lastCron: oldCron });
await user.post(endpoint, { dayStart: 1 });
await user.sync();
@@ -32,7 +32,7 @@ describe('POST /user/custom-day-start', () => {
});
it('returns a confirmation message', async () => {
let {message} = await user.post(endpoint, { dayStart: 1 });
const { message } = await user.post(endpoint, { dayStart: 1 });
expect(message).to.eql(t('customDayStartHasChanged'));
});
@@ -41,7 +41,7 @@ describe('POST /user/custom-day-start', () => {
await expect(user.post(endpoint, { dayStart: 'foo' }))
.to.eventually.be.rejected;
await expect(user.post(endpoint, { dayStart: 24}))
await expect(user.post(endpoint, { dayStart: 24 }))
.to.eventually.be.rejected;
});
});