Skip to content

Commit f61842e

Browse files
committed
test: ensure aggregation+explain test only looks for explain output
The server may optimize certain parts of an aggregation away, so we can't ensure this will always be a static size array returned
1 parent 71a0270 commit f61842e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/functional/aggregation_tests.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,8 @@ describe('Aggregation', function() {
483483
// Iterate over all the items in the cursor
484484
cursor.explain(function(err, result) {
485485
expect(err).to.be.null;
486-
expect(result.stages).to.have.length(4);
486+
expect(result.stages).to.have.lengthOf.at.least(1);
487+
expect(result.stages[0]).to.have.key('$cursor');
487488

488489
client.close(done);
489490
});

0 commit comments

Comments
 (0)