fix linting

This commit is contained in:
Matteo Pagliazzi
2018-02-17 18:41:49 +01:00
parent 80fe58bc6f
commit b619496f8e
6 changed files with 14 additions and 14 deletions
@@ -478,8 +478,8 @@ describe('POST /chat', () => {
context('Spam prevention', () => {
it('Returns an error when the user has been posting too many messages', async () => {
// Post as many messages are needed to reach the spam limit
for (let i = 0; i < SPAM_MESSAGE_LIMIT; i++) {
let result = await additionalMember.post(`/groups/${TAVERN_ID}/chat`, { message: testMessage }); // eslint-disable-line no-await-in-loop
for (let i = 0; i < SPAM_MESSAGE_LIMIT; i++) { // eslint-disable-line no-await-in-loop
let result = await additionalMember.post(`/groups/${TAVERN_ID}/chat`, { message: testMessage });
expect(result.message.id).to.exist;
}
@@ -494,8 +494,8 @@ describe('POST /chat', () => {
let userSocialite = await member.update({'contributor.level': SPAM_MIN_EXEMPT_CONTRIB_LEVEL, 'flags.chatRevoked': false});
// Post 1 more message than the spam limit to ensure they do not reach the limit
for (let i = 0; i < SPAM_MESSAGE_LIMIT + 1; i++) {
let result = await userSocialite.post(`/groups/${TAVERN_ID}/chat`, { message: testMessage }); // eslint-disable-line no-await-in-loop
for (let i = 0; i < SPAM_MESSAGE_LIMIT + 1; i++) { // eslint-disable-line no-await-in-loop
let result = await userSocialite.post(`/groups/${TAVERN_ID}/chat`, { message: testMessage });
expect(result.message.id).to.exist;
}
});
@@ -113,10 +113,10 @@ describe('GET /tasks/user', () => {
await user.sync();
let initialTodoCount = user.tasksOrder.todos.length;
for (let i = 0; i < numberOfTodos; i++) {
for (let i = 0; i < numberOfTodos; i++) { // eslint-disable-line no-await-in-loop
let id = todos[i]._id;
await user.post(`/tasks/${id}/score/up`); // eslint-disable-line no-await-in-loop
await user.post(`/tasks/${id}/score/up`);
}
await user.sync();
@@ -33,9 +33,9 @@ describe('POST /tasks/clearCompletedTodos', () => {
let tasks = await user.get('/tasks/user?type=todos');
expect(tasks.length).to.equal(initialTodoCount + 7);
for (let task of tasks) {
for (let task of tasks) { // eslint-disable-line no-await-in-loop
if (['todo 2', 'todo 3', 'todo 6'].indexOf(task.text) !== -1) {
await user.post(`/tasks/${task._id}/score/up`); // eslint-disable-line no-await-in-loop
await user.post(`/tasks/${task._id}/score/up`);
}
}