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

The expected and received values ​​seem to be reversed #3309

Closed
6 tasks done
btea opened this issue May 6, 2023 · 3 comments · Fixed by #3314
Closed
6 tasks done

The expected and received values ​​seem to be reversed #3309

btea opened this issue May 6, 2023 · 3 comments · Fixed by #3314

Comments

@btea
Copy link
Contributor

btea commented May 6, 2023

Describe the bug

expect(xx).toBe(xx)
When an error occurs, the expected value and received value prompt information seem to be reversed.

vitest

image

jest

image

Reproduction

https://stackblitz.com/edit/node-w1fgff?file=package.json

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
    Memory: 2.54 GB / 15.86 GB
  Binaries:
    Node: 16.17.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 7.22.0 - ~\AppData\Roaming\npm\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (112.0.1722.68)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @vitest/coverage-c8: ^0.29.8 => 0.29.8
    vite: ^4.2.1 => 4.2.1
    vitest: ^0.31.0 => 0.31.0

Used Package Manager

pnpm

Validations

@stackblitz
Copy link

stackblitz bot commented May 7, 2023

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

@sheremet-va
Copy link
Member

sheremet-va commented May 7, 2023

The colors in the tooltip are reversed.

@btea
Copy link
Contributor Author

btea commented May 7, 2023

The correct tooltip might be something like:

- Expected -1 (green)
- Received +1 (red)

- 1  (green)
+ 2  (red)

@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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants