Changing indexing in tests

master
Mark Moffat 2019-06-12 18:26:08 +09:30
parent 9860ac2de5
commit 536a3c4612
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,7 @@ function setup(db, app){
db.users.insertMany(jsonData.users), db.users.insertMany(jsonData.users),
db.customers.insertMany(jsonData.customers), db.customers.insertMany(jsonData.customers),
db.products.insertMany(common.fixProductDates(jsonData.products)), db.products.insertMany(common.fixProductDates(jsonData.products)),
db.menu.insertOne(jsonData.menu), db.menu.insertOne(jsonData.menu)
common.runIndexing(app)
]); ]);
}); });
} }
@ -46,6 +45,7 @@ test.before(async () => {
db = app.db; db = app.db;
await setup(db, app); await setup(db, app);
await common.runIndexing(app);
// Get some data from DB to use in compares // Get some data from DB to use in compares
products = await db.products.find({}).toArray(); products = await db.products.find({}).toArray();