Skip to content

docs: document pretty-format and its usage across Vitest + add unit tests#10052

Merged
sheremet-va merged 17 commits intovitest-dev:mainfrom
hi-ogawa:docs/pretty-format-overview
Apr 4, 2026
Merged

docs: document pretty-format and its usage across Vitest + add unit tests#10052
sheremet-va merged 17 commits intovitest-dev:mainfrom
hi-ogawa:docs/pretty-format-overview

Conversation

@hi-ogawa
Copy link
Copy Markdown
Collaborator

@hi-ogawa hi-ogawa commented Apr 3, 2026

Description

Test cases are copied from #9609

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 Apr 3, 2026

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c3fd950
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69cf50553c7bb5000870c2f7
😎 Deploy Preview https://deploy-preview-10052--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.

@hi-ogawa hi-ogawa marked this pull request as ready for review April 3, 2026 04:48
@hi-ogawa hi-ogawa changed the title docs: document pretty-format and its usage across Vitest docs: document pretty-format and its usage across Vitest + add unit tests Apr 3, 2026

[GitHub](https://github.com/vitest-dev/vitest/tree/main/packages/pretty-format) | [Documentation](https://vitest.dev/)

## Usage
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.

I'd like to keep readme to a minimum to reduce the size in node_modules. Let's follow the same logic we did for the mocker package (define usage in a separate .md file)

Copy link
Copy Markdown
Collaborator Author

@hi-ogawa hi-ogawa Apr 4, 2026

Choose a reason for hiding this comment

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

I don't mind moving this but that reasoning means you don't want excessive jsdoc in code too. What's the boundary?
(for example, should jsdoc also minimized and better to just link to vitest.dev?)

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.

What's the boundary?

The boundary is README. Jsdoc is at least visible in the code editors

@hi-ogawa hi-ogawa requested a review from sheremet-va April 4, 2026 01:30
@sheremet-va sheremet-va merged commit d562712 into vitest-dev:main Apr 4, 2026
15 of 16 checks passed
@hi-ogawa hi-ogawa deleted the docs/pretty-format-overview branch April 4, 2026 08:50
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.

Document and add unit tests for @vitest/pretty-format

2 participants