Skip to content
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

fix!: add correct location and snapshot fields in json reporter #5434

Merged
merged 7 commits into from May 7, 2024

Conversation

sheremet-va
Copy link
Member

@sheremet-va sheremet-va commented Mar 26, 2024

Description

JSON reporter incorrectly gets the location from the test error. Vitest 1.4.0 introduced --includeTaskLocation flag and we can now reliably take it from there (which actually follows jest behaviour).

This PR adds a missing snapshot property to the root of the json reporter.

The failureMessages now includes the full stack trace.

Related: #5350
Follow-up #5435

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.

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:.

@sheremet-va sheremet-va added this to the 2.0.0 milestone Mar 26, 2024
Copy link

netlify bot commented Mar 26, 2024

Deploy Preview for fastidious-cascaron-4ded94 ready!

Name Link
🔨 Latest commit 41f3685
🔍 Latest deploy log https://app.netlify.com/sites/fastidious-cascaron-4ded94/deploys/663a003a86286a000872a5e8
😎 Deploy Preview https://deploy-preview-5434--fastidious-cascaron-4ded94.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 site configuration.

@sheremet-va sheremet-va changed the title fix!: add correct location and snapshot fields in json reporter, remove empty suite fix!: add correct location and snapshot fields in json reporter May 6, 2024
@sheremet-va sheremet-va merged commit bcccce6 into vitest-dev:main May 7, 2024
17 of 19 checks passed
@sheremet-va sheremet-va deleted the fix/json-reporter branch May 7, 2024 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant