lint: Fix tests that can be fixed with the eslint --fix flag

This commit is contained in:
Blade Barringer
2015-12-30 21:16:26 -06:00
parent 6f220c6869
commit 70151fd073
14 changed files with 41 additions and 41 deletions
@@ -41,5 +41,5 @@ describe('GET /tasks', () => {
});
// TODO complete after task scoring is done
it('returns completed todos sorted by creation date if req.query.includeCompletedTodos is specified')
it('returns completed todos sorted by creation date if req.query.includeCompletedTodos is specified');
});
@@ -284,7 +284,7 @@ describe('POST /tasks', () => {
return user.post('/tasks', {
text: 'test reward',
type: 'reward',
value: "10",
value: '10',
}).then((task) => {
expect(task.value).to.eql(10);
});
@@ -54,7 +54,7 @@ describe('POST /tasks/:id/score/:direction', () => {
it('moves completed todos out of user.tasksOrder.todos', () => {
return user.get('/user')
.then(user => {
expect(user.tasksOrder.todos.indexOf(todo._id)).to.not.equal(-1)
expect(user.tasksOrder.todos.indexOf(todo._id)).to.not.equal(-1);
}).then(() => user.post(`/tasks/${todo._id}/score/up`))
.then(() => user.get(`/tasks/${todo._id}`))
.then((updatedTask) => {
@@ -62,14 +62,14 @@ describe('POST /tasks/:id/score/:direction', () => {
return user.get('/user');
})
.then((user) => {
expect(user.tasksOrder.todos.indexOf(todo._id)).to.equal(-1)
expect(user.tasksOrder.todos.indexOf(todo._id)).to.equal(-1);
});
});
it('moves un-completed todos back into user.tasksOrder.todos', () => {
return user.get('/user')
.then(user => {
expect(user.tasksOrder.todos.indexOf(todo._id)).to.not.equal(-1)
expect(user.tasksOrder.todos.indexOf(todo._id)).to.not.equal(-1);
}).then(() => user.post(`/tasks/${todo._id}/score/up`))
.then(() => user.post(`/tasks/${todo._id}/score/down`))
.then(() => user.get(`/tasks/${todo._id}`))
@@ -242,7 +242,7 @@ describe('POST /tasks/:id/score/:direction', () => {
text: 'test plus habit',
type: 'habit',
down: false,
})
});
}).then((task) => {
plusHabit = task;
user.post('/tasks', {
@@ -250,7 +250,7 @@ describe('POST /tasks/:id/score/:direction', () => {
type: 'habit',
up: false,
down: false,
})
});
}).then((task) => {
neitherHabit = task;
});
@@ -127,7 +127,7 @@ describe('PUT /tasks/:id', () => {
});
}).then((savedTodo2) => {
expect(savedTodo2.checklist.length).to.equal(1);
expect(savedTodo2.checklist[0].text).to.equal("789");
expect(savedTodo2.checklist[0].text).to.equal('789');
expect(savedTodo2.checklist[0].completed).to.equal(false);
});
});
@@ -190,7 +190,7 @@ describe('PUT /tasks/:id', () => {
});
}).then((savedDaily2) => {
expect(savedDaily2.checklist.length).to.equal(1);
expect(savedDaily2.checklist[0].text).to.equal("789");
expect(savedDaily2.checklist[0].text).to.equal('789');
expect(savedDaily2.checklist[0].completed).to.equal(false);
});
});
@@ -281,7 +281,7 @@ describe('PUT /tasks/:id', () => {
it('requires value to be coerced into a number', () => {
return user.put(`/tasks/${reward._id}`, {
value: "100",
value: '100',
}).then((task) => {
expect(task.value).to.eql(100);
});