@@ -3430,6 +3430,10 @@ added:
34303430 - v18.9.0
34313431 - v16.19.0
34323432changes:
3433+ - version: REPLACEME
3434+ pr-url: https://github.com/nodejs/node/pull/64309
3435+ description: Added `entryFile` to events forwarded from child processes
3436+ when tests run with process isolation.
34333437 - version: v24.19.0
34343438 pr-url: https://github.com/nodejs/node/pull/63435
34353439 description: Added `parentId` to test events that carry a `testId`.
@@ -3514,6 +3518,10 @@ Emitted when code coverage is enabled and all tests have completed.
35143518 * ` cause ` {Error} The actual error thrown by the test.
35153519 * ` type ` {string|undefined} The type of the test, used to denote whether
35163520 this is a suite.
3521+ * ` entryFile ` {string|undefined} The path of the test file that was
3522+ executed as the entry point of the child process that emitted this event.
3523+ Only present when tests run with process isolation. May differ from
3524+ ` file ` when the test is defined in a module imported by the entry file.
35173525 * ` file ` {string|undefined} The path of the test file,
35183526 ` undefined ` if test was run through the REPL.
35193527 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3543,6 +3551,10 @@ The corresponding declaration ordered events are `'test:pass'` and `'test:fail'`
35433551* ` data ` {Object}
35443552 * ` column ` {number|undefined} The column number where the test is defined, or
35453553 ` undefined ` if the test was run through the REPL.
3554+ * ` entryFile ` {string|undefined} The path of the test file that was
3555+ executed as the entry point of the child process that emitted this event.
3556+ Only present when tests run with process isolation. May differ from
3557+ ` file ` when the test is defined in a module imported by the entry file.
35463558 * ` file ` {string|undefined} The path of the test file,
35473559 ` undefined ` if test was run through the REPL.
35483560 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3569,6 +3581,10 @@ defined. The corresponding declaration ordered event is `'test:start'`.
35693581* ` data ` {Object}
35703582 * ` column ` {number|undefined} The column number where the test is defined, or
35713583 ` undefined ` if the test was run through the REPL.
3584+ * ` entryFile ` {string|undefined} The path of the test file that was
3585+ executed as the entry point of the child process that emitted this event.
3586+ Only present when tests run with process isolation. May differ from
3587+ ` file ` when the test is defined in a module imported by the entry file.
35723588 * ` file ` {string|undefined} The path of the test file,
35733589 ` undefined ` if test was run through the REPL.
35743590 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3590,6 +3606,10 @@ defined.
35903606* ` data ` {Object}
35913607 * ` column ` {number|undefined} The column number where the test is defined, or
35923608 ` undefined ` if the test was run through the REPL.
3609+ * ` entryFile ` {string|undefined} The path of the test file that was
3610+ executed as the entry point of the child process that emitted this event.
3611+ Only present when tests run with process isolation. May differ from
3612+ ` file ` when the test is defined in a module imported by the entry file.
35933613 * ` file ` {string|undefined} The path of the test file,
35943614 ` undefined ` if test was run through the REPL.
35953615 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3622,6 +3642,10 @@ Emitted when a test is enqueued for execution.
36223642 this is a suite.
36233643 * ` attempt ` {number|undefined} The attempt number of the test run,
36243644 present only when using the [ ` --test-rerun-failures ` ] [ ] flag.
3645+ * ` entryFile ` {string|undefined} The path of the test file that was
3646+ executed as the entry point of the child process that emitted this event.
3647+ Only present when tests run with process isolation. May differ from
3648+ ` file ` when the test is defined in a module imported by the entry file.
36253649 * ` file ` {string|undefined} The path of the test file,
36263650 ` undefined ` if test was run through the REPL.
36273651 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3685,6 +3709,10 @@ since the parent runner only knows about file-level tests. When using
36853709 present only when using the [ ` --test-rerun-failures ` ] [ ] flag.
36863710 * ` passed_on_attempt ` {number|undefined} The attempt number the test passed on,
36873711 present only when using the [ ` --test-rerun-failures ` ] [ ] flag.
3712+ * ` entryFile ` {string|undefined} The path of the test file that was
3713+ executed as the entry point of the child process that emitted this event.
3714+ Only present when tests run with process isolation. May differ from
3715+ ` file ` when the test is defined in a module imported by the entry file.
36883716 * ` file ` {string|undefined} The path of the test file,
36893717 ` undefined ` if test was run through the REPL.
36903718 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3714,6 +3742,10 @@ The corresponding execution ordered event is `'test:complete'`.
37143742* ` data ` {Object}
37153743 * ` column ` {number|undefined} The column number where the test is defined, or
37163744 ` undefined ` if the test was run through the REPL.
3745+ * ` entryFile ` {string|undefined} The path of the test file that was
3746+ executed as the entry point of the child process that emitted this event.
3747+ Only present when tests run with process isolation. May differ from
3748+ ` file ` when the test is defined in a module imported by the entry file.
37173749 * ` file ` {string|undefined} The path of the test file,
37183750 ` undefined ` if test was run through the REPL.
37193751 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3730,6 +3762,10 @@ defined.
37303762* ` data ` {Object}
37313763 * ` column ` {number|undefined} The column number where the test is defined, or
37323764 ` undefined ` if the test was run through the REPL.
3765+ * ` entryFile ` {string|undefined} The path of the test file that was
3766+ executed as the entry point of the child process that emitted this event.
3767+ Only present when tests run with process isolation. May differ from
3768+ ` file ` when the test is defined in a module imported by the entry file.
37333769 * ` file ` {string|undefined} The path of the test file,
37343770 ` undefined ` if test was run through the REPL.
37353771 * ` line ` {number|undefined} The line number where the test is defined, or
@@ -3754,6 +3790,9 @@ The corresponding execution ordered event is `'test:dequeue'`.
37543790### Event: ` 'test:stderr' `
37553791
37563792* ` data ` {Object}
3793+ * ` entryFile ` {string|undefined} The path of the test file that was
3794+ executed as the entry point of the child process that emitted this event.
3795+ Only present when tests run with process isolation.
37573796 * ` file ` {string} The path of the test file.
37583797 * ` message ` {string} The message written to ` stderr ` .
37593798
@@ -3765,6 +3804,9 @@ defined.
37653804### Event: ` 'test:stdout' `
37663805
37673806* ` data ` {Object}
3807+ * ` entryFile ` {string|undefined} The path of the test file that was
3808+ executed as the entry point of the child process that emitted this event.
3809+ Only present when tests run with process isolation.
37683810 * ` file ` {string} The path of the test file.
37693811 * ` message ` {string} The message written to ` stdout ` .
37703812
0 commit comments