Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 9a8af8d

Browse files
author
Ryan Schumacher
committed
Add done callback
1 parent dd0e75d commit 9a8af8d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/helpers.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ _beforeEach.withApp = function(app) {
2727
}
2828

2929
_beforeEach.cleanDatasource = function(dsName) {
30-
beforeEach(function() {
30+
beforeEach(function(done) {
3131
if(!dsName) dsName = 'db';
3232

33-
if (this.app) {
33+
if (typeof this.app === 'function'
34+
&& typeof this.app.datasources === 'object'
35+
&& typeof this.app.datasources[dsName] === 'object') {
3436
this.app.datasources[dsName].automigrate();
3537
this.app.datasources[dsName].connector.ids = {};
3638
}
39+
40+
done();
3741
});
3842
}
3943

0 commit comments

Comments
 (0)