@@ -3440,6 +3440,10 @@ added:
34403440 - v18.9.0
34413441 - v16.19.0
34423442changes:
3443+ - version: REPLACEME
3444+ pr-url: https://github.com/nodejs/node/pull/REPLACEME
3445+ description: Added `entryFile` to events forwarded from child processes
3446+ when tests run with process isolation.
34433447 - version: v26.3.0
34443448 pr-url: https://github.com/nodejs/node/pull/63435
34453449 description: Added `parentId` to test events that carry a `testId`.
@@ -3524,6 +3528,10 @@ Emitted when code coverage is enabled and all tests have completed.
35243528 * ` cause ` {Error} The actual error thrown by the test.
35253529 * ` type ` {string|undefined} The type of the test, used to denote whether
35263530 this is a suite.
3531+ * ` entryFile ` {string|undefined} The path of the test file that was
3532+ executed as the entry point of the child process that emitted this event.
3533+ Only present when tests run with process isolation. May differ from
3534+ ` file ` when the test is defined in a module imported by the entry file.
35273535 * ` file ` {string|undefined} The path of the test file,
35283536 ` undefined ` if test was run through the REPL.
35293537 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3553,6 +3561,10 @@ The corresponding declaration ordered events are `'test:pass'` and `'test:fail'`
35533561* ` data ` {Object}
35543562 * ` column ` {number|undefined} The column number where the test is defined, or
35553563 ` undefined ` if the test was run through the REPL.
3564+ * ` entryFile ` {string|undefined} The path of the test file that was
3565+ executed as the entry point of the child process that emitted this event.
3566+ Only present when tests run with process isolation. May differ from
3567+ ` file ` when the test is defined in a module imported by the entry file.
35563568 * ` file ` {string|undefined} The path of the test file,
35573569 ` undefined ` if test was run through the REPL.
35583570 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3579,6 +3591,10 @@ defined. The corresponding declaration ordered event is `'test:start'`.
35793591* ` data ` {Object}
35803592 * ` column ` {number|undefined} The column number where the test is defined, or
35813593 ` undefined ` if the test was run through the REPL.
3594+ * ` entryFile ` {string|undefined} The path of the test file that was
3595+ executed as the entry point of the child process that emitted this event.
3596+ Only present when tests run with process isolation. May differ from
3597+ ` file ` when the test is defined in a module imported by the entry file.
35823598 * ` file ` {string|undefined} The path of the test file,
35833599 ` undefined ` if test was run through the REPL.
35843600 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3600,6 +3616,10 @@ defined.
36003616* ` data ` {Object}
36013617 * ` column ` {number|undefined} The column number where the test is defined, or
36023618 ` undefined ` if the test was run through the REPL.
3619+ * ` entryFile ` {string|undefined} The path of the test file that was
3620+ executed as the entry point of the child process that emitted this event.
3621+ Only present when tests run with process isolation. May differ from
3622+ ` file ` when the test is defined in a module imported by the entry file.
36033623 * ` file ` {string|undefined} The path of the test file,
36043624 ` undefined ` if test was run through the REPL.
36053625 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3632,6 +3652,10 @@ Emitted when a test is enqueued for execution.
36323652 this is a suite.
36333653 * ` attempt ` {number|undefined} The attempt number of the test run,
36343654 present only when using the [ ` --test-rerun-failures ` ] [ ] flag.
3655+ * ` entryFile ` {string|undefined} The path of the test file that was
3656+ executed as the entry point of the child process that emitted this event.
3657+ Only present when tests run with process isolation. May differ from
3658+ ` file ` when the test is defined in a module imported by the entry file.
36353659 * ` file ` {string|undefined} The path of the test file,
36363660 ` undefined ` if test was run through the REPL.
36373661 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3697,6 +3721,10 @@ since the parent runner only knows about file-level tests. When using
36973721 present only when using the [ ` --test-rerun-failures ` ] [ ] flag.
36983722 * ` passed_on_attempt ` {number|undefined} The attempt number the test passed on,
36993723 present only when using the [ ` --test-rerun-failures ` ] [ ] flag.
3724+ * ` entryFile ` {string|undefined} The path of the test file that was
3725+ executed as the entry point of the child process that emitted this event.
3726+ Only present when tests run with process isolation. May differ from
3727+ ` file ` when the test is defined in a module imported by the entry file.
37003728 * ` file ` {string|undefined} The path of the test file,
37013729 ` undefined ` if test was run through the REPL.
37023730 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3726,6 +3754,10 @@ The corresponding execution ordered event is `'test:complete'`.
37263754* ` data ` {Object}
37273755 * ` column ` {number|undefined} The column number where the test is defined, or
37283756 ` undefined ` if the test was run through the REPL.
3757+ * ` entryFile ` {string|undefined} The path of the test file that was
3758+ executed as the entry point of the child process that emitted this event.
3759+ Only present when tests run with process isolation. May differ from
3760+ ` file ` when the test is defined in a module imported by the entry file.
37293761 * ` file ` {string|undefined} The path of the test file,
37303762 ` undefined ` if test was run through the REPL.
37313763 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3742,6 +3774,10 @@ defined.
37423774* ` data ` {Object}
37433775 * ` column ` {number|undefined} The column number where the test is defined, or
37443776 ` undefined ` if the test was run through the REPL.
3777+ * ` entryFile ` {string|undefined} The path of the test file that was
3778+ executed as the entry point of the child process that emitted this event.
3779+ Only present when tests run with process isolation. May differ from
3780+ ` file ` when the test is defined in a module imported by the entry file.
37453781 * ` file ` {string|undefined} The path of the test file,
37463782 ` undefined ` if test was run through the REPL.
37473783 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3766,6 +3802,9 @@ The corresponding execution ordered event is `'test:dequeue'`.
37663802### Event: ` 'test:stderr' `
37673803
37683804* ` data ` {Object}
3805+ * ` entryFile ` {string|undefined} The path of the test file that was
3806+ executed as the entry point of the child process that emitted this event.
3807+ Only present when tests run with process isolation.
37693808 * ` file ` {string} The path of the test file.
37703809 * ` message ` {string} The message written to ` stderr ` .
37713810
@@ -3777,6 +3816,9 @@ defined.
37773816### Event: ` 'test:stdout' `
37783817
37793818* ` data ` {Object}
3819+ * ` entryFile ` {string|undefined} The path of the test file that was
3820+ executed as the entry point of the child process that emitted this event.
3821+ Only present when tests run with process isolation.
37803822 * ` file ` {string} The path of the test file.
37813823 * ` message ` {string} The message written to ` stdout ` .
37823824
0 commit comments