close
Skip to content

feat: add createReport and .vitest report directory convention#9993

Merged
sheremet-va merged 2 commits intovitest-dev:mainfrom
AriPerkkio:docs/reporter-directory-convention
Apr 22, 2026
Merged

feat: add createReport and .vitest report directory convention#9993
sheremet-va merged 2 commits intovitest-dev:mainfrom
AriPerkkio:docs/reporter-directory-convention

Conversation

@AriPerkkio
Copy link
Copy Markdown
Member

@AriPerkkio AriPerkkio commented Mar 27, 2026

Description

Resolves #9952

Once merged, I'll create follow-up issue for using .vitest in Vitest's built-in reporters (at least html?) and for other artifacts. Changing default values will be breaking change.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 27, 2026

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4e83815
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69e84ec3db706700081039e3
😎 Deploy Preview https://deploy-preview-9993--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread docs/guide/index.md
Comment thread docs/guide/advanced/reporters.md
Comment thread docs/guide/advanced/reporters.md
@hi-ogawa
Copy link
Copy Markdown
Collaborator

hi-ogawa commented Mar 29, 2026

Looks good to me. For the follow-up, would we also add .vitest for various default ignore/exclude like test, coverage, etc? (also watch ignore?)

@Srasti527

This comment was marked as spam.

@AriPerkkio AriPerkkio marked this pull request as draft April 9, 2026 15:54
@AriPerkkio AriPerkkio changed the title docs(reporters): .vitest results directory convention feat(reporters): add createResultsWriter and .vitest results directory convention Apr 9, 2026
@AriPerkkio AriPerkkio changed the title feat(reporters): add createResultsWriter and .vitest results directory convention feat(reporters): add createResultWriter and .vitest results directory convention Apr 9, 2026
@AriPerkkio AriPerkkio changed the title feat(reporters): add createResultWriter and .vitest results directory convention feat: add createResultWriter and .vitest results directory convention Apr 9, 2026
Comment thread docs/api/advanced/vitest.md Outdated
@AriPerkkio AriPerkkio force-pushed the docs/reporter-directory-convention branch from 54c6d60 to 06187af Compare April 10, 2026 06:57
@AriPerkkio AriPerkkio marked this pull request as ready for review April 10, 2026 06:57
@AriPerkkio AriPerkkio requested a review from sheremet-va April 10, 2026 06:57
@AriPerkkio AriPerkkio force-pushed the docs/reporter-directory-convention branch from 06187af to bafc69b Compare April 10, 2026 07:23
hi-ogawa
hi-ogawa previously approved these changes Apr 11, 2026
Comment thread docs/api/advanced/vitest.md Outdated
Comment thread packages/vitest/src/node/reporters/result-writer.ts Outdated
@AriPerkkio AriPerkkio force-pushed the docs/reporter-directory-convention branch 2 times, most recently from b5e8c66 to 22a357e Compare April 12, 2026 10:15
hi-ogawa
hi-ogawa previously approved these changes Apr 13, 2026
Comment thread docs/api/advanced/vitest.md Outdated
Comment thread docs/api/advanced/vitest.md
Comment thread packages/vitest/src/node/reporters/result-writer.ts Outdated
Comment thread packages/vitest/src/node/reporters/result-writer.ts Outdated
Comment thread packages/vitest/src/node/reporters/result-writer.ts Outdated
Comment thread packages/vitest/src/node/core.ts Outdated
@sheremet-va
Copy link
Copy Markdown
Member

Maybe adding readdir would also be helpful

@AriPerkkio AriPerkkio changed the title feat: add createResultWriter and .vitest results directory convention feat: add createReport and .vitest report directory convention Apr 13, 2026
@AriPerkkio AriPerkkio added this to the 5.0.0 milestone Apr 13, 2026
hi-ogawa
hi-ogawa previously approved these changes Apr 14, 2026
Comment thread packages/vitest/src/node/reporters/report.ts Outdated
Copy link
Copy Markdown
Member Author

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Team meeting notes:

  • Lets' mark this as experimental and release in next patch too. Stabilize in 5.0.0

@AriPerkkio AriPerkkio force-pushed the docs/reporter-directory-convention branch from 68b12bf to 38f9b1c Compare April 18, 2026 10:15
@AriPerkkio AriPerkkio removed this from the 5.0.0 milestone Apr 18, 2026
@sheremet-va
Copy link
Copy Markdown
Member

Oops, I forgot about this one for 4.1.5 👀 We can either release a 4.1.6 or keep it in 5.0.0.

sheremet-va
sheremet-va previously approved these changes Apr 21, 2026
function delete(filename: string): Promise<void>
```

Delete a file from the report directory for this scope.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it also deletes a folder?

Comment thread docs/api/advanced/vitest.md Outdated
Comment thread packages/vitest/src/node/reporters/report.ts Outdated
Comment thread packages/vitest/src/node/core.ts Outdated
Co-authored-by: Ari Perkkiö <ari.perkkio@gmail.com>
@sheremet-va sheremet-va merged commit 72a6dc2 into vitest-dev:main Apr 22, 2026
13 of 16 checks passed
@AriPerkkio AriPerkkio deleted the docs/reporter-directory-convention branch April 22, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define convention for test reporter output directory

4 participants