Files
mongo/jstests/aggregation/sources/setWindowFields/add_to_set.js
2023-07-05 21:23:02 +00:00

17 lines
468 B
JavaScript

/**
* Test that $addToSet works as a window function.
*/
import {
seedWithTickerData,
testAccumAgainstGroup
} from "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", []);