-
Notifications
You must be signed in to change notification settings - Fork 1.8k
test(NODE-7493): enable source maps and add nyc-free debug scripts #4947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
228897f
9f81852
340248e
d5fbddd
130a107
54b538c
d017df9
f0ab685
a1be2a8
8a43b07
9572717
47b5f13
5c8b796
a395f48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,8 +141,10 @@ | |
| "check:dts": "npm run build:bundle && node ./node_modules/typescript/bin/tsc --target es2023 --module commonjs --noEmit mongodb.d.ts && tsd", | ||
| "check:search-indexes": "npm run build:bundle && nyc mocha --config test/mocha_mongodb.js test/manual/search-index-management.prose.test.ts", | ||
| "check:test": "npm run build:bundle && nyc mocha --config test/mocha_mongodb.js test/integration", | ||
| "check:test:debug": "npm run mocha:debug -- --config test/mocha_mongodb.js test/integration", | ||
| "check:test-bundled": "MONGODB_BUNDLED=true npm run check:test", | ||
| "check:unit": "npm run build:bundle && nyc mocha test/unit", | ||
| "check:unit:debug": "npm run mocha:debug -- test/unit", | ||
|
PavelSafronov marked this conversation as resolved.
|
||
| "check:unit-bundled": "MONGODB_BUNDLED=true npm run check:unit", | ||
| "check:ts": "node ./node_modules/typescript/bin/tsc -v && node ./node_modules/typescript/bin/tsc --noEmit", | ||
| "check:atlas": "npm run build:bundle && nyc mocha --config test/manual/mocharc.js test/manual/atlas_connectivity.test.ts", | ||
|
|
@@ -157,6 +159,7 @@ | |
| "check:csfle": "npm run build:bundle && nyc mocha --config test/mocha_mongodb.js test/integration/client-side-encryption", | ||
| "check:snappy": "npm run build:bundle && nyc mocha test/unit/assorted/snappy.test.js", | ||
| "check:x509": "npm run build:bundle && nyc mocha test/manual/x509_auth.test.ts", | ||
| "mocha:debug": "npm run build:bundle && node --inspect --enable-source-maps --no-experimental-strip-types ./node_modules/mocha/bin/mocha.js", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The flag
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This guards against using I suspect this worked for me because the same line got slipped into Similarly, is there a .mocharc.js that we can specify to pass in |
||
| "build:bundle": "npm run bundle:driver && npm run bundle:types && npm run build:runtime-barrel", | ||
| "build:runtime-barrel": "node etc/build-runtime-barrel.mjs", | ||
| "bundle:driver": "node etc/bundle-driver.mjs", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,5 @@ | ||
| /* eslint-disable simple-import-sort/imports */ | ||
|
|
||
| // eslint-disable-next-line @typescript-eslint/no-require-imports | ||
| require('source-map-support').install({ | ||
| hookRequire: true | ||
| }); | ||
|
Comment on lines
-3
to
-6
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this make integration tests not debug with the correct lines? I know we didn't discover how to replicate this for unit tests but does it make sense to remove for int?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FFTR, we know the real fix is c8 and it's on the horizon |
||
|
|
||
| import * as process from 'process'; | ||
| import * as os from 'os'; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
source-map-supportis no longer used, remove?