-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
vitest.base.unit.config.ts
Outdated
@@ -20,7 +20,7 @@ export default defineConfig({ | |||
], | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
vitest.base.unit.config.ts
Outdated
@@ -41,5 +41,6 @@ export default defineConfig({ | |||
"**/node_modules/**", | |||
], | |||
}, | |||
onConsoleLog: () => process.env.STRIP_CONSOLE_OUTPUT !== "true", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be use use TEST_CONSOLE_QUITE
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be merged after #6783 to document the env variables on the table @nazarhussain added in the other PR
f32d709
to
c39b914
Compare
Motivation
Current tests output can be quite verbose, and display interleaved
console
output.Description
Default behavior is unchanged. 2 env variables allow to tweak
vitest
output:USE_BASIC_REPORTER
to produce a basic tests summarySTRIP_CONSOLE_OUTPUT
to strip console output from tests summarye.g.
STRIP_CONSOLE_OUTPUT=true USE_BASIC_REPORTER=true yarn test:spec:mainnet
will produce the following output: