vitest-dev / vitest-dev/vitest
Display Snapshot of the component in Vitest UI
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17.1k
- Forks
- 2k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 94
Description
Clear and concise description of the problem
When I create a snapshot of the component in the test, I have to look for the file I try to figure out which is the component I want to see (When I make a few snapshots), because they are all in the same file. The style of the file doesn't let me check very well. Most of when the component is a form, I want to check if the fields are filled correctly.
Suggested solution
Maybe it could be a way to display the component snapshot in vitest-ui, to check the component snapshot in that place, so the users won't need to search the snapshot file and try to figure out the bad style of the component.
Display this in vitest UI I think will improve the development of the tests and it will be more efficient to check if everything is ok.
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Vitest UI entry point for displaying test snapshots and the existing handling of component snapshots. Define how a component snapshot should be selected and rendered in the UI, then verify that users can distinguish and inspect multiple component snapshots without opening the snapshot file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100