mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
fix test lint
This commit is contained in:
@@ -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;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user