Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修正單元測試程式,修正覆蓋率問題與通過 mongoose v7 版本 #58

Merged
merged 2 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lib/mongoose.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ function createOneClient(config, app) {

assert(url, '[egg-mongoose] url is required on config');

// Notice we MUST add an option arg called `useNewUrlParser` and set to `true`
// in default, otherwises there'll be a warning since v4.X of mongodb.
// Ref: https://github.com/eggjs/egg/issues/3081
if (!options.hasOwnProperty('useNewUrlParser')) {
options.useNewUrlParser = true;
}
app.coreLogger.info('[egg-mongoose] connecting %s', filteredURL);

// remove all plugins
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
],
"dependencies": {
"await-first": "^1.0.0",
"mongoose": "^7.2.2"
"mongoose": "^7.5.2"
},
"devDependencies": {
"bluebird": "^3.5.1",
"dotenv": "^7.0.0",
"egg": "^3.16.0",
"egg-bin": "^6.4.1",
Expand Down
21 changes: 0 additions & 21 deletions test/fixtures/apps/mongoose-custom/app/controller/book.js

This file was deleted.

21 changes: 0 additions & 21 deletions test/fixtures/apps/mongoose-custom/app/controller/user.js

This file was deleted.

10 changes: 0 additions & 10 deletions test/fixtures/apps/mongoose-custom/app/model/Book.js

This file was deleted.

5 changes: 0 additions & 5 deletions test/fixtures/apps/mongoose-custom/app/model/other.js

This file was deleted.

10 changes: 0 additions & 10 deletions test/fixtures/apps/mongoose-custom/app/model/user.js

This file was deleted.

6 changes: 0 additions & 6 deletions test/fixtures/apps/mongoose-custom/app/router.js

This file was deleted.

9 changes: 0 additions & 9 deletions test/fixtures/apps/mongoose-custom/config/config.default.js

This file was deleted.

4 changes: 0 additions & 4 deletions test/fixtures/apps/mongoose-custom/package.json

This file was deleted.

Loading