chore: improve vitest output - #6779
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #6779 +/- ##
============================================
- Coverage 61.88% 61.88% -0.01%
============================================
Files 562 562
Lines 59309 59331 +22
Branches 1916 1916
============================================
+ Hits 36703 36715 +12
- Misses 22563 22573 +10
Partials 43 43 |
| reporters: process.env.GITHUB_ACTIONS | ||
| ? ["verbose", "hanging-process", "github-actions"] | ||
| : ["verbose", "hanging-process"], | ||
| : [process.env.USE_BASIC_REPORTER === "true" ? "basic" : "verbose", "hanging-process"], |
There was a problem hiding this comment.
It's good and aligned to what we already have before changing to verbose because other team members want to see all the tests which are passing as well not just the one which are failing.
We may change this flag to TEST_COMPACT_OUTPUT or something similar for clarity and to remember.
| "**/node_modules/**", | ||
| ], | ||
| }, | ||
| onConsoleLog: () => process.env.STRIP_CONSOLE_OUTPUT !== "true", |
There was a problem hiding this comment.
May be use use TEST_CONSOLE_QUITE here.
nflaig
left a comment
There was a problem hiding this comment.
This should probably be merged after #6783 to document the env variables on the table @nazarhussain added in the other PR
Motivation
Current tests output can be quite verbose, and display interleaved
consoleoutput.Description
Default behavior is unchanged. 2 env variables allow to tweak
vitestoutput:USE_BASIC_REPORTERto produce a basic tests summarySTRIP_CONSOLE_OUTPUTto strip console output from tests summarye.g.
STRIP_CONSOLE_OUTPUT=true USE_BASIC_REPORTER=true yarn test:spec:mainnetwill produce the following output: