|
beforeAll(async () => { |
|
const url = `mongodb://127.0.0.1/${databaseName}`; |
|
await mongoose.connect(url, { useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true }); |
|
|
|
await Question.createCollection(); |
|
await Answer.createCollection(); |
Great work creating a testing data set to work against! Great way to confirm function without compromising the existing data set.
QuestAPI/src/spec/setupTests.js
Lines 31 to 36 in a1ea73d
Great work creating a testing data set to work against! Great way to confirm function without compromising the existing data set.