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

Checking for invalid date #2319

Closed
6 tasks done
demensky opened this issue Nov 11, 2022 · 0 comments · Fixed by #2326
Closed
6 tasks done

Checking for invalid date #2319

demensky opened this issue Nov 11, 2022 · 0 comments · Fixed by #2326

Comments

@demensky
Copy link

Describe the bug

Unable to check for an Invalid Date. The problem is reproduced with both toStrictEqual and toEqual.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-xyvefv?file=test%2Fbasic.test.ts

test('Invalid Date', () => {
  expect(new Date(NaN)).toEqual(new Date(NaN));
});

System Info

System:
    OS: macOS 13.0
    CPU: (10) arm64 Apple M1 Max
    Memory: 40.08 GB / 64.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.0.0 - /usr/local/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 8.19.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 107.0.5304.110
    Chrome Canary: 109.0.5414.0
    Firefox: 104.0.2
    Safari: 16.1
  npmPackages:
    vite: ^3.2.3 => 3.2.3 
    vitest: ^0.25.1 => 0.25.1

Used Package Manager

pnpm

Validations

@github-actions github-actions bot locked and limited conversation to collaborators Jun 10, 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