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

@@ -4,15 +4,15 @@ import {
describe('GET /export/userdata.json', () => {
it('should return a valid JSON file with user data', async () => {
let user = await generateUser();
let tasks = await user.post('/tasks/user', [
{type: 'habit', text: 'habit 1'},
{type: 'daily', text: 'daily 1'},
{type: 'reward', text: 'reward 1'},
{type: 'todo', text: 'todo 1'},
const user = await generateUser();
const tasks = await user.post('/tasks/user', [
{ type: 'habit', text: 'habit 1' },
{ type: 'daily', text: 'daily 1' },
{ type: 'reward', text: 'reward 1' },
{ type: 'todo', text: 'todo 1' },
]);
let res = await user.get('/export/userdata.json');
const res = await user.get('/export/userdata.json');
expect(res._id).to.equal(user._id);
expect(res).to.contain.all.keys(['tasks', 'flags', 'tasksOrder', 'auth']);
expect(res.auth.local).not.to.have.keys(['salt', 'hashed_password']);