-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: add blob reporter #5663
feat: add blob reporter #5663
Conversation
✅ Deploy Preview for fastidious-cascaron-4ded94 canceled.
|
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.
Awesome, thanks for starting the implementation for this! I've been meaninig to look into this for long time but haven't found time for it. 🙌
Some quick comments below.
9332873
to
75f9aa1
Compare
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.
Looks good. As test case we could have something like:
test('merge reports', async () => {
await runVitest({
include: ['**/first.test.ts'],
reporters: [['blob', { outputFile: './vitest-reports/first-run.json' }]],
})
await runVitest({
include: ['**/second.test.ts'],
reporters: [['blob', { outputFile: './vitest-reports/second-run.json' }]],
})
const { stdout } = await runVitest({
mergeReports: './vitest-reports',
reporters: [['json', { outputFile: null }]], // JSON report to stdout
})
expect(stdout)...
})
And later we should set up an example project maybe in the vitest-tests
organization demonstrating how to use --shard
and mergeReports
with multiple CI machines.
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.
Very nice! Looks good to go after checking test and doc.
277bbac
to
e29ee17
Compare
Description
For now, it's a
json
file with all results. If we keep it that way, then maybe we should rename the reporter.Run
vitest --reporter=blob --outputFile=reports/blob1.json
to record all test runsRun
vitest --merge-reports=reports
to report all test runsTODO:
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.