Skip to content

Commit

Permalink
test: fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed Apr 5, 2020
1 parent 3cedcb6 commit f17bfb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/northwind/__tests__/queriesFromIndex-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ let db;
beforeAll(async () => {
mongoServer = new MongodbMemoryServer({ instance: { dbName: 'northwind' } });
const mongoUri = await mongoServer.getConnectionString();
mongoose.set('useCreateIndex', true);
const opts = { useNewUrlParser: true, useUnifiedTopology: true };
mongoose.connect(mongoUri, opts);
mongoose.connection.once('disconnected', () => {
Expand All @@ -25,7 +24,7 @@ beforeAll(async () => {
db = con.db('northwind');
await seed(db);
// take time to mongo create indexes if needed
await new Promise((resolve) => setTimeout(resolve, 10000));
await new Promise((resolve) => setTimeout(resolve, 3000));
});

afterAll(async () => {
Expand Down

0 comments on commit f17bfb2

Please sign in to comment.