blob: 18d2c99edb6ea9bb80329b9f18b02b0a2a05f2e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/**
* Test that $setWindowFields is excluded from API version 1.
*/
(function() {
"use strict";
const coll = db[jsTestName()];
coll.drop();
coll.insert({a: 1});
coll.insert({a: 2});
// Test that $count is included from API Version 1 so long as it's used in $group.
assert.commandWorked(db.runCommand({
aggregate: coll.getName(),
pipeline: [{$group: {_id: null, count: {$count: {}}}}],
cursor: {},
apiVersion: "1",
apiStrict: true
}));
})();
|