From f17bfb27ce966c235f7f5197cab4767ec7308a68 Mon Sep 17 00:00:00 2001 From: nodkz Date: Sun, 5 Apr 2020 22:41:13 +0600 Subject: [PATCH] test: fix broken test --- examples/northwind/__tests__/queriesFromIndex-test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/northwind/__tests__/queriesFromIndex-test.js b/examples/northwind/__tests__/queriesFromIndex-test.js index 75f9396..9a7bb8e 100644 --- a/examples/northwind/__tests__/queriesFromIndex-test.js +++ b/examples/northwind/__tests__/queriesFromIndex-test.js @@ -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', () => { @@ -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 () => {