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: hide ignored stacktrace on windows #1116

Conversation

sapphi-red
Copy link
Contributor

stackIgnorePatterns was not working on windows.
This PR simply fixes it.

Before

 FAIL  expect.test.ts > hi
AssertionError: expected 2 to deeply equal 3
 ❯ expect.test.ts:4:16
      2| 
      3| test('hi', () => {
      4|   expect(1 + 1).toEqual(3)
       |                ^
      5| })
      6| 
 ❯ ../../../packages/vitest/dist/vendor-index.0d6b419a.js:82:26
 ❯ runTest ../../../packages/vitest/dist/entry.js:803:40
 ❯ async runSuite ../../../packages/vitest/dist/entry.js:868:13
 ❯ async runFiles ../../../packages/vitest/dist/entry.js:905:5
 ❯ async startTests ../../../packages/vitest/dist/entry.js:911:3
 ❯ async ../../../packages/vitest/dist/entry.js:938:7
 ❯ async withEnv ../../../packages/vitest/dist/entry.js:533:5
 ❯ async run ../../../packages/vitest/dist/entry.js:937:5

  - Expected   3
  + Received   2

After

 FAIL  expect.test.ts > hi
AssertionError: expected 2 to deeply equal 3
 ❯ expect.test.ts:4:16
      2| 
      3| test('hi', () => {
      4|   expect(1 + 1).toEqual(3)
       |                ^
      5| })
      6| 

  - Expected   3
  + Received   2

@netlify
Copy link

netlify bot commented Apr 6, 2022

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit dc49410
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/624dcb000ac01a0008debece
😎 Deploy Preview https://deploy-preview-1116--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 site settings.

@patak-dev patak-dev merged commit 57c048b into vitest-dev:main Apr 6, 2022
@sapphi-red sapphi-red deleted the fix/hide-ignored-stack-trace-on-windows branch April 7, 2022 03:54
chaii3 pushed a commit to chaii3/vitest that referenced this pull request May 13, 2022
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.

None yet

3 participants