Skip to content

Commit

Permalink
chore(tests): try to use a timeout to wait for predecessing test to c…
Browse files Browse the repository at this point in the history
…omplete
  • Loading branch information
balthazar committed Feb 8, 2015
1 parent 953db19 commit 2710e01
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions test/test-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ describe('Launching api tests', function () {
bangApi = helpers.createGenerator('bangular:api', [bangDir + '/api'], 'restock');
helpers.mockPrompt(bangApi, { url: '/api/restocks' });
bangApi.run(function () {
assert.file('server/api/restock/index.js');
assert.file('server/api/restock/restock.controller.js');
assert.file('server/api/restock/restock.spec.js');
assert.file('server/api/restock/restock.model.js');

assert.fileContent('server/routes.js', 'app.use(\'/api/restocks\', require(\'./api/restock\'));');
assert.fileContent('server/routes.js', 'app.use(\'/api/users\', require(\'./api/user\'));');
done();
setTimeout(function () {
assert.file('server/api/restock/index.js');
assert.file('server/api/restock/restock.controller.js');
assert.file('server/api/restock/restock.spec.js');
assert.file('server/api/restock/restock.model.js');

assert.fileContent('server/routes.js', 'app.use(\'/api/restocks\', require(\'./api/restock\'));');
assert.fileContent('server/routes.js', 'app.use(\'/api/users\', require(\'./api/user\'));');
done();
}, 30);
});
});

Expand Down

0 comments on commit 2710e01

Please sign in to comment.