summaryrefslogtreecommitdiff
path: root/jstests/core/push_sort.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/push_sort.js')
-rw-r--r--jstests/core/push_sort.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/core/push_sort.js b/jstests/core/push_sort.js
index 5b599e04ec8..2d74a3909f8 100644
--- a/jstests/core/push_sort.js
+++ b/jstests/core/push_sort.js
@@ -63,7 +63,7 @@ var res = t.update({_id: 8}, {$push: {x: {$sort: {a: -1}}}});
// Test that when given a document with a $sort field that matches the form of a plain document
// (instead of a $sort modifier document), $push will add that field to the specified array.
assert.commandWorked(res);
-assert.docEq(t.findOne({_id: 8}), {_id: 8, x: [{a: 1}, {a: 2}, {$sort: {a: -1}}]});
+assert.docEq({_id: 8, x: [{a: 1}, {a: 2}, {$sort: {a: -1}}]}, t.findOne({_id: 8}));
t.save({_id: 100, x: [{a: 1}]});