Skip to content

Commit 06398a3

Browse files
committed
test: use a universally supported invalid query
MongoDB 4.3+ supports projecting an `_id` inverted from another field in a find, like it has previously for aggegate. This changes the query to one that is guaranteed to not be supported
1 parent 6475fd9 commit 06398a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/functional/find_tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1951,7 +1951,7 @@ describe('Find', function() {
19511951
function(err) {
19521952
test.equal(null, err);
19531953

1954-
col.find({}, { skip: 1, limit: 1, fields: { _id: 1, b: 0 } }).toArray(function(err) {
1954+
col.find({}, { skip: 1, limit: 1, fields: { a: 1, b: 0 } }).toArray(function(err) {
19551955
test.ok(err instanceof Error);
19561956
client.close(done);
19571957
});

0 commit comments

Comments
 (0)