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

Snapshot diff and legend uses wrong colors #3364

Closed
6 tasks done
jschirrmacher opened this issue May 12, 2023 · 2 comments
Closed
6 tasks done

Snapshot diff and legend uses wrong colors #3364

jschirrmacher opened this issue May 12, 2023 · 2 comments

Comments

@jschirrmacher
Copy link

jschirrmacher commented May 12, 2023

Describe the bug

If a snapshot differs, output currently looks like that:

- Expected  - 1
+ Received  + 1

    <p␊
      data-v-ffea87fb=""␊
    >␊
-     May 12, 2023, ab 1 PM␊
+     May 12, 2023, ab 3 PM␊
    </p>␊

But unlike in this Markdown example, in vitest the legend (Expected / Received) colors are swapped:

Bildschirmfoto 2023-05-13 um 00 18 00

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-1cdu7k?file=test/suite.test.ts

System Info

System:
    OS: macOS 13.3.1
    CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
    Memory: 86.28 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nodenv/versions/18.12.1/bin/node
    npm: 8.19.2 - ~/.nodenv/versions/18.12.1/bin/npm
  Browsers:
    Safari: 16.4
  npmPackages:
    @vitejs/plugin-vue: ^4.2.1 => 4.2.1 
    @vitest/coverage-c8: ^0.31.0 => 0.31.0 
    vite: ^4.3.5 => 4.3.5 
    vitest: ^0.31.0 => 0.31.0

Used Package Manager

npm

Validations

@stackblitz
Copy link

stackblitz bot commented May 12, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@sheremet-va
Copy link
Member

Fixed by #3314

@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants