| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Signed-off-by: hanityx <hanityx@gmail.com>
|
Review requested:
|
Sorry, something went wrong.
Signed-off-by: hanityx <hanityx@gmail.com>
Codecov Report❌ Patch coverage is 96.11650% with 4 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #65147 +/- ##
==========================================
+ Coverage 90.31% 90.32% +0.01%
==========================================
Files 759 759
Lines 248301 248425 +124
Branches 46864 46887 +23
==========================================
+ Hits 224246 224394 +148
- Misses 15471 15475 +4
+ Partials 8584 8556 -28
... and 36 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
|
IMHO #64389 is a better approach rather than monkeypatching existing APis |
Sorry, something went wrong.
There was a problem hiding this comment.
I don't think modifying this API is an option. It's built to follow web standards, this would break that contract
Sorry, something went wrong.
|
Closing this. I don't think the current Console integration is the right mechanism here, and context.log() provides an explicit path for attributed logging. If automatic console attribution comes up again, the question of whether the test runner should support it can be picked up in #53103. Thanks for the feedback! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When tests run under process isolation, output from the built-in global console reaches the parent through the child process's stdout and stderr streams. By the time the parent emits test:stdout or test:stderr, it no longer knows which test produced the write. Custom reporters therefore cannot associate the output with a test, and it can arrive before the matching test:dequeue. Depending on how the pipe is drained, writes from different tests can also be combined into a single raw event.
The test runner installs an internal write hook on the built-in global console in child processes that use the V8 serializer. While a non-root test or suite is active, the formatted message is emitted through its TestsStream with testId, parentId, name, nesting, and source location metadata. These events bypass the per-file declaration-order buffer, so they stay in execution order after the matching test:dequeue.
This follows the approach suggested by cjihrig in #53103 (comment).
context.log() and context.diagnostic() remain the explicit reporting APIs. The hook also covers global console calls made by code under test or third-party modules, without requiring those callers to use the test context APIs. The existing test:stdout and test:stderr event types are preserved.
Scope
Tests
Fixes: #53103