connor4312 / nodejs-testing

VS Code integration for node:test native tests
MIT License
50 stars 7 forks source link

Don't swallow errors #28

Closed rluvaton closed 8 months ago

rluvaton commented 9 months ago

if a test has SyntaxError for example the test runner output will show

worker1> starting ~/replace-and-keep-offest/src/index.test.js
worker1> 1..0 # no tests found

instead of the output (in my case SyntaxError):

SyntaxError: Unexpected end of input
    at internalCompileFunction (node:internal/vm:77:18)
    at wrapSafe (node:internal/modules/cjs/loader:1288:20)
    at Module._compile (node:internal/modules/cjs/loader:1340:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49