File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ module.exports = {
1515 */
1616 preset : '@shelf/jest-mongodb' ,
1717
18+ /**
19+ * Setup file to provide global APIs needed by MongoDB driver
20+ */
21+ setupFilesAfterEnv : [ '<rootDir>/test/setup.ts' ] ,
22+
1823 /**
1924 * TypeScript support
2025 */
Original file line number Diff line number Diff line change 2020 "test:integration:down" : " docker compose -f docker-compose.test.yml down --volumes"
2121 },
2222 "devDependencies" : {
23- "@shelf/jest-mongodb" : " ^1.2.2" ,
23+ "@shelf/jest-mongodb" : " ^6.0.2" ,
24+ "@swc/core" : " ^1.3.0" ,
2425 "@types/jest" : " ^26.0.8" ,
2526 "eslint" : " ^6.7.2" ,
2627 "eslint-config-codex" : " 1.2.4" ,
8889 "zod" : " ^3.25.76"
8990 },
9091 "resolutions" : {
91- "bson" : " ^7.0 .0"
92+ "bson" : " ^6.7 .0"
9293 }
9394}
Original file line number Diff line number Diff line change 1+ /**
2+ * Jest setup file to provide global APIs needed by MongoDB driver
3+ */
4+
5+ import { performance } from 'perf_hooks' ;
6+
7+ /**
8+ * MongoDB 6.x requires global performance API
9+ * Node.js provides it via perf_hooks module
10+ */
11+ global . performance = performance as any ;
12+
You can’t perform that action at this time.
0 commit comments