summaryrefslogtreecommitdiff
path: root/jstests/aggregation/sources/setWindowFields/add_to_set.js
blob: a6370f4c46ef3792339c3a0355319bf45f381d5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
 * Test that $addToSet works as a window function.
 */
(function() {
"use strict";

load("jstests/aggregation/extras/window_function_helpers.js");

const coll = db[jsTestName()];
coll.drop();

// Create a collection of tickers and prices.
const nDocsPerTicker = 10;
seedWithTickerData(coll, nDocsPerTicker);

// Run the suite of partition and bounds tests against the $addToSet function.
testAccumAgainstGroup(coll, "$addToSet", []);
})();