vitest-dev / vitest-dev/vitest

Add diff to JSON reporter result

Open
#7,583 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feat: reporters
Dominant language
TypeScript
Stars
17.1k
Forks
2k
Avg merge
1d 22h
Merged PRs (30d)
94

Description

Clear and concise description of the problem

Currently, there is no property storing the diff for a failed test. we only have the failureMessages.

Suggested solution

Add a property to the JSON reporter test result for a diff related to an expect failure.

Alternative

No response

Additional context

No response

Validations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the JSON reporter's test-result output and the existing failureMessages handling. Confirm how expect failures expose their diff, then add coverage showing that the JSON result includes a diff property for those failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.