Skip to content

Commit 92cb64c

Browse files
committed
rebase fixes
1 parent fd9b1f5 commit 92cb64c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

test/functional/operation_example.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2934,7 +2934,7 @@ describe('Operation Examples', function () {
29342934
{ upsert: true, writeConcern: { w: 1 } },
29352935
function (err, result) {
29362936
expect(err).to.not.exist;
2937-
test.equal(1, result.result.n);
2937+
expect(result).property('upsertedCount').to.equal(1);
29382938

29392939
// Fetch the document that we modified and check if it got inserted correctly
29402940
collection.findOne({ a: 1 }, function (err, item) {

test/functional/operation_generators_example.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4464,7 +4464,7 @@ describe('Operation (Generators)', function () {
44644464
// Get the collection
44654465
var col = db.collection('find_one_and_delete_with_generators');
44664466
var r = yield col.insertMany([{ a: 1, b: 1 }], { writeConcern: { w: 1 } });
4467-
test.equal(1, r.result.n);
4467+
expect(r).property('insertedCount').to.equal(1);
44684468

44694469
r = yield col.findOneAndDelete({ a: 1 }, { projection: { b: 1 }, sort: { a: 1 } });
44704470
test.equal(1, r.lastErrorObject.n);
@@ -4509,7 +4509,7 @@ describe('Operation (Generators)', function () {
45094509
// Get the collection
45104510
var col = db.collection('find_one_and_replace_with_generators');
45114511
var r = yield col.insertMany([{ a: 1, b: 1 }], { writeConcern: { w: 1 } });
4512-
test.equal(1, r.result.n);
4512+
expect(r).property('insertedCount').to.equal(1);
45134513

45144514
r = yield col.findOneAndReplace(
45154515
{ a: 1 },
@@ -4564,7 +4564,7 @@ describe('Operation (Generators)', function () {
45644564
// Get the collection
45654565
var col = db.collection('find_one_and_update_with_generators');
45664566
var r = yield col.insertMany([{ a: 1, b: 1 }], { writeConcern: { w: 1 } });
4567-
test.equal(1, r.result.n);
4567+
expect(r).property('insertedCount').to.equal(1);
45684568

45694569
r = yield col.findOneAndUpdate(
45704570
{ a: 1 },

test/functional/operation_promises_example.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4831,7 +4831,7 @@ describe('Operation (Promises)', function () {
48314831
// Get the collection
48324832
var col = db.collection('find_one_and_replace_with_promise');
48334833
return col.insertMany([{ a: 1, b: 1 }], { writeConcern: { w: 1 } }).then(function (r) {
4834-
test.equal(1, r.result.n);
4834+
expect(r).property('insertedCount').to.equal(1);
48354835

48364836
return col
48374837
.findOneAndReplace(

0 commit comments

Comments
 (0)