This refactors several tests in core to not rely on an implicit sort order, which allows them to be unblacklisted from the causally consistent jscore passthroughs.
14 lines
369 B
JavaScript
14 lines
369 B
JavaScript
(function() {
|
|
"use strict";
|
|
|
|
const coll = db.sort3;
|
|
coll.drop();
|
|
|
|
assert.writeOK(coll.insert({a: 1}));
|
|
assert.writeOK(coll.insert({a: 5}));
|
|
assert.writeOK(coll.insert({a: 3}));
|
|
|
|
assert.eq([1, 3, 5], coll.find().sort({a: 1}).toArray().map(doc => doc.a));
|
|
assert.eq([5, 3, 1], coll.find().sort({a: -1}).toArray().map(doc => doc.a));
|
|
}());
|