tests(api): Add async to every it, before and beforeEach in v2 tests

This commit is contained in:
Blade Barringer
2016-01-01 10:32:28 -06:00
parent 23aaf78167
commit 69c5192f70
28 changed files with 186 additions and 186 deletions

View File

@@ -5,24 +5,24 @@ import {
describe('GET /user', () => {
let user;
before(async () => {
before(async async () => {
let usr = await generateUser();
user = await usr.get('/user');
});
it('gets the user object', () => {
it('gets the user object', async () => {
expect(user._id).to.eql(user._id);
expect(user.auth.local.username).to.eql(user.auth.local.username);
expect(user.todos).to.eql(user.todos);
expect(user.items).to.eql(user.items);
});
it('does not include password information', () => {
it('does not include password information', async () => {
expect(user.auth.local.hashed_password).to.not.exist
expect(user.auth.local.salt).to.not.exist
});
it('does not include api token', () => {
it('does not include api token', async () => {
expect(user.apiToken).to.not.exist
});
});