Files
mongo/jstests/query_golden/example.js
Zac 591928c619 SERVER-108478 JS formatted by prettier and remove clang-format (#39656)
GitOrigin-RevId: 6c8f6aded47f260aa4f7c231b17dae3302cb1e04
2025-08-21 17:27:09 +00:00

18 lines
350 B
JavaScript

/**
* Example query-correctness test using the golden-data framework.
*/
import {show} from "jstests/libs/golden_test.js";
const coll = db.query_golden_example;
coll.drop();
for (let i = 0; i < 10; ++i) {
coll.insert({_id: i, a: i});
}
jsTestLog("Collection contents");
show(coll.find());
jsTestLog("ID lookup");
show(coll.find({_id: 5}));