You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be also quickly reproduced on Vitest repo:
$ pnpm -C test/browser exec vitest run test/failing.test.ts
RUN v1.1.3 /home/hiroshi/code/others/vitest/test/browser
Browser runner started at http://localhost:5173
stderr | unknown test //// <--- redundant automatic stderr log
expected 1 to be 2 // Object.is equality //// because test failure gets reported below anyway
❯ test/failing.test.ts (1)
× correctly fails and prints a diff
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL test/failing.test.ts > correctly fails and prints a diff
AssertionError: expected 1 to be 2 // Object.is equality
...
This log is coming from console.error in BrowserTestRunner.onAfterRunTask:
The code runs on browser, so this essentially allows error.message to show up on browser devtools, but for default reporter, spied console is also redirected to terminal and it looks redundant there.
I suspect this could be a unintended debug logging, but I would appreciate if someone can confirm that's really the case.
Describe the bug
I wasn't sure if this is a feature, but it looks a little confusing at first sight at least.
Minimal reproduction with example log and comparison with non-browser pools is here https://github.com/hi-ogawa/repro-vitest-browser-error-log-redundant.
This can be also quickly reproduced on Vitest repo:
This log is coming from
console.error
inBrowserTestRunner.onAfterRunTask
:vitest/packages/browser/src/client/runner.ts
Lines 28 to 32 in a73c1c2
The code runs on browser, so this essentially allows
error.message
to show up on browser devtools, but for default reporter, spied console is also redirected to terminal and it looks redundant there.I suspect this could be a unintended debug logging, but I would appreciate if someone can confirm that's really the case.
Reproduction
https://github.com/hi-ogawa/repro-vitest-browser-error-log-redundant
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: