fix: improve error on module not found#8704
Conversation
| global.TextDecoder = TextDecoder; | ||
| } | ||
| installCommonGlobals(global, config.globals); | ||
| // Node's error-message stack size is limited at 10, but it's pretty useful |
| ): Promise<RunTestInternalResult> { | ||
| // Node's error-message stack size is limited at 10, but it's pretty useful | ||
| // to see more than that when a test fails. | ||
| Error.stackTraceLimit = 100; |
There was a problem hiding this comment.
when the error happens outside the test sandbox (such as when resolving a dependency in jest-runtime)
|
|
||
| at Resolver.resolveModule (../../packages/jest-resolve/build/index.js:259:17) | ||
| at Object.<anonymous> (node_modules/discord.js/src/index.js:21:12) | ||
| at Object.require (test.js:3:1) |
There was a problem hiding this comment.
this line is about 15 lines into the stack, which is why it wasn't included before (and we were missing the code frame)
6d986a6 to
9b4cbac
Compare
|
I have no idea why there's more open handles with this change :( |
|
Maybe |
|
I wonder if the change to stack limit means old frames aren't gc-ed. Can we change the length and trigger a gc before checking for handles? maybe... |
29a90d2 to
dae11e5
Compare
6a4f9c3 to
70f9077
Compare
1d5b8c0 to
e5d4d10
Compare
edb669d to
6b1d2ba
Compare
83ad129 to
e81cfaf
Compare
e81cfaf to
f1dc432
Compare
f1dc432 to
3d1d24a
Compare
|
This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
3d1d24a to
2a1a8ba
Compare
|
Oldie! 😀 |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Before

After

Test plan
E2E test added