-
-
Notifications
You must be signed in to change notification settings - Fork 35.1k
Closed as duplicate of#61153
Description
Version
25
Platform
Darwin
Subsystem
No response
What steps will reproduce the bug?
- The test file
// test.mjs
import- Run
node --test --watch- Any change
touch test.mjsHow often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
What: Don't hang.
Why: Because it should watch.
What do you see instead?
Hangs after the summary until Ctrl+C and prints one last summary after that.
So for the minimal example given before, that's one error message and two summaries in total.
The error is similar to this:
SyntaxError: Unexpected end of input
at compileSourceTextModule (node:internal/modules/esm/utils:305:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:111:18)
at #translate (node:internal/modules/esm/loader:467:20)
at afterLoad (node:internal/modules/esm/loader:523:29)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:528:12)
at #getOrCreateModuleJobAfterResolve (node:internal/modules/esm/loader:565:36)
at afterResolve (node:internal/modules/esm/loader:618:52)
at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:624:12)
at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:643:32)
at TracingChannel.tracePromise (node:diagnostics_channel:350:14)Additional information
Idea: --test and --watch should have what --check does as an internal per file and change prerequisite.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels