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

[Bug]: Comparing different URLs with toStrictEqual succeeds #14668

Closed
haines opened this issue Nov 1, 2023 · 2 comments
Closed

[Bug]: Comparing different URLs with toStrictEqual succeeds #14668

haines opened this issue Nov 1, 2023 · 2 comments

Comments

@haines
Copy link

haines commented Nov 1, 2023

Version

29.7.0

Steps to reproduce

  1. Clone https://github.com/haines/jest-url-strict-equality
  2. npm install
  3. npm test
  4. See that the test (spuriously) fails

Expected behavior

This assertion should pass

expect(new URL("https://abc.xyz")).not.toStrictEqual(new URL("ftp://wat.no"))

Actual behavior

The assertion fails - the two different URLs are being treated as strictly equal.

Additional context

No response

Environment

System:
  OS: macOS 13.6
  CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Binaries:
  Node: 20.9.0 - ~/.local/share/nvm/v20.9.0/bin/node
  npm: 10.2.1 - ~/.local/share/nvm/v20.9.0/bin/npm
npmPackages:
    jest: ^29.7.0 => 29.7.0
@SimenB
Copy link
Member

SimenB commented Nov 1, 2023

Duplicate of #14399, I believe

Copy link

github-actions bot commented Dec 2, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

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

No branches or pull requests

2 participants