Skip to content

Commit 6276e0b

Browse files
author
Felipe Parreira
committed
test: fix async to use done
1 parent 2af11bb commit 6276e0b

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

tests/end-to-end/api/01-users.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -348,22 +348,22 @@ describe('[Users]', function() {
348348
.expect((res) => {
349349
expect(res.body).to.have.property('success', true);
350350
})
351-
.end(done);
352-
353-
request.get(api('users.info'))
354-
.set(credentials)
355-
.query({
356-
username: 'ufs',
357-
})
358-
.expect(200)
359-
.expect((res) => {
360-
expect(res.body).to.have.property('success', true);
361-
expect(res.body.user).to.have.property('type', 'user');
362-
expect(res.body.user).to.have.property('name', 'testuser');
363-
expect(res.body.user).to.have.property('username', 'ufs');
364-
expect(res.body.user).to.have.property('active', true);
365-
})
366-
.end(done);
351+
.then(() => {
352+
request.get(api('users.info'))
353+
.set(credentials)
354+
.query({
355+
username: 'ufs',
356+
})
357+
.expect(200)
358+
.expect((res) => {
359+
expect(res.body).to.have.property('success', true);
360+
expect(res.body.user).to.have.property('type', 'user');
361+
expect(res.body.user).to.have.property('name', 'testuser');
362+
expect(res.body.user).to.have.property('username', 'ufs');
363+
expect(res.body.user).to.have.property('active', true);
364+
})
365+
.end(done);
366+
});
367367
});
368368
});
369369
describe('[/users.getPresence]', () => {

0 commit comments

Comments
 (0)