Skip to content

Commit 824f08b

Browse files
committed
Adds small delay to startDB
1 parent 48057b9 commit 824f08b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

spec/helper.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ if (process.env.PARSE_SERVER_TEST_DB === 'postgres') {
4848
collectionPrefix: 'test_',
4949
});
5050
} else {
51-
startDB = require('mongodb-runner/mocha/before').bind({
52-
timeout: () => {},
53-
slow: () => {}
54-
});
51+
startDB = function(done) {
52+
require('mongodb-runner/mocha/before').bind({
53+
timeout: () => {},
54+
slow: () => {}
55+
})(() => {
56+
setTimeout(done, 500);
57+
});
58+
}
5559
stopDB = require('mongodb-runner/mocha/after');
5660
databaseAdapter = new MongoStorageAdapter({
5761
uri: mongoURI,

0 commit comments

Comments
 (0)