Skip to content

Commit

Permalink
test: turn test callback synchronous
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Parreira committed Sep 11, 2020
1 parent 2c4eeb0 commit 2af11bb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/end-to-end/api/01-users.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ describe('[Users]', function() {
});
});

it('should correctly route users that have `ufs` in their username', async () => {
await request.post(api('users.create'))
it('should correctly route users that have `ufs` in their username', (done) => {
request.post(api('users.create'))
.set(credentials)
.send({
email: 'me@email.com',
Expand All @@ -347,9 +347,10 @@ describe('[Users]', function() {
.expect(200)
.expect((res) => {
expect(res.body).to.have.property('success', true);
});
})
.end(done);

await request.get(api('users.info'))
request.get(api('users.info'))
.set(credentials)
.query({
username: 'ufs',
Expand All @@ -361,7 +362,8 @@ describe('[Users]', function() {
expect(res.body.user).to.have.property('name', 'testuser');
expect(res.body.user).to.have.property('username', 'ufs');
expect(res.body.user).to.have.property('active', true);
});
})
.end(done);
});
});
describe('[/users.getPresence]', () => {
Expand Down

0 comments on commit 2af11bb

Please sign in to comment.