-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(NODE-4925)!: remove deprecated options and types #3513
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
Changes from 13 commits
272af43
0749cfa
571b74e
157ef8d
4fbb8c8
b7ea756
ae59f78
510f373
1893944
7898796
fa65ee3
3ff6eef
b98e029
d175098
2ee7912
07daf19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -670,21 +670,7 @@ describe('CRUD API', function () { | |
| // Legacy update method | ||
| // ------------------------------------------------- | ||
| const legacyRemove = function () { | ||
| db.collection('t4_1').insertMany( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing the |
||
| [{ a: 1 }, { a: 1 }], | ||
| { writeConcern: { w: 1 } }, | ||
| function (err, r) { | ||
| expect(err).to.not.exist; | ||
| test.equal(2, r.insertedCount); | ||
|
|
||
| db.collection('t4_1').remove({ a: 1 }, { single: true }, function (err, r) { | ||
| expect(err).to.not.exist; | ||
| test.equal(1, r.deletedCount); | ||
|
|
||
| deleteOne(); | ||
| }); | ||
| } | ||
| ); | ||
| deleteOne(); | ||
| }; | ||
|
|
||
| // | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,52 +107,6 @@ describe('Remove', function () { | |
| } | ||
| }); | ||
|
|
||
| it('should correctly remove only first document', { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to above, removing |
||
| metadata: { | ||
| requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } | ||
| }, | ||
|
|
||
| test: function (done) { | ||
| const self = this; | ||
| const client = self.configuration.newClient(self.configuration.writeConcernMax(), { | ||
| maxPoolSize: 1 | ||
| }); | ||
|
|
||
| client.connect(function (err, client) { | ||
| const db = client.db(self.configuration.db); | ||
| expect(err).to.not.exist; | ||
|
|
||
| db.createCollection('shouldCorrectlyRemoveOnlyFirstDocument', function (err) { | ||
| expect(err).to.not.exist; | ||
|
|
||
| const collection = db.collection('shouldCorrectlyRemoveOnlyFirstDocument'); | ||
|
|
||
| collection.insert( | ||
| [{ a: 1 }, { a: 1 }, { a: 1 }, { a: 1 }], | ||
| { writeConcern: { w: 1 } }, | ||
| function (err) { | ||
| expect(err).to.not.exist; | ||
|
|
||
| // Remove the first | ||
| collection.remove( | ||
| { a: 1 }, | ||
| { writeConcern: { w: 1 }, single: true }, | ||
| function (err, r) { | ||
| expect(r).property('deletedCount').to.equal(1); | ||
|
|
||
| collection.find({ a: 1 }).count(function (err, result) { | ||
| expect(result).to.equal(3); | ||
| client.close(done); | ||
| }); | ||
| } | ||
| ); | ||
| } | ||
| ); | ||
| }); | ||
| }); | ||
| } | ||
| }); | ||
|
|
||
| it('should not error on empty remove', { | ||
| metadata: { | ||
| requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.