Skip to content

Commit

Permalink
fix: fix tests failed error
Browse files Browse the repository at this point in the history
Second parameter of mongoose.connect should be the opts, if no specific opts needed, pass undefined.
  • Loading branch information
cwang1221 committed Feb 5, 2021
1 parent af80161 commit e02a6cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generators/app/templates/test/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let mongoServer
beforeAll(async () => {
mongoServer = new MongodbMemoryServer()
const mongoUri = await mongoServer.getUri()
await mongoose.connect(mongoUri, (err) => {
await mongoose.connect(mongoUri, undefined, (err) => {
if (err) console.error(err)
})
})
Expand Down

0 comments on commit e02a6cc

Please sign in to comment.