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

failing test diff is flipped since version 0.32.1 #3619

Closed
6 tasks done
Nilegfx opened this issue Jun 19, 2023 · 1 comment · Fixed by #3620
Closed
6 tasks done

failing test diff is flipped since version 0.32.1 #3619

Nilegfx opened this issue Jun 19, 2023 · 1 comment · Fixed by #3620
Milestone

Comments

@Nilegfx
Copy link

Nilegfx commented Jun 19, 2023

Describe the bug

the following test:

import { describe, test, expect } from 'vitest';

describe('rejects', () => {
  test('buyApples throws an error when no id provideds', async () => {
    // toThrow returns a promise now, so you HAVE to await it
    await expect('abc').toBe('abcd');
  });
});

has different failing diff/results for version 0.32.0 and 0.32.1. 0.32.0 is the correct expected results (at least to me)

0.32.0 results (correct)

AssertionError: expected 'abc' to be 'abcd' // Object.is equality

  - Expected  - 0
  + Received  + 1

  - 'abcd'
  + 'abc'

0.32.1 results (incorrect)

AssertionError: expected 'abc' to be 'abcd' // Object.is equality

- Expected
+ Received

- abc
+ abcd

Reproduction

Minimal reproduction

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
  npmPackages:
    @vitest/ui: 0.31.4 => 0.31.4 
    vite: 4.3.9 => 4.3.9 
    vitest: 0.32.1 => 0.32.1

Used Package Manager

yarn

Validations

@stackblitz
Copy link

stackblitz bot commented Jun 19, 2023

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

@sheremet-va sheremet-va added this to the 0.32.2 milestone Jun 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 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

Successfully merging a pull request may close this issue.

2 participants