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]: toEqual with URL not work on node v20 #14585

Closed
bluelovers opened this issue Sep 30, 2023 · 2 comments · Fixed by #14672
Closed

[Bug]: toEqual with URL not work on node v20 #14585

bluelovers opened this issue Sep 30, 2023 · 2 comments · Fixed by #14672

Comments

@bluelovers
Copy link

Version

29.7.0

Steps to reproduce

toEqual with URL not work on node v20

https://codesandbox.io/p/sandbox/node-js-jest-example-forked-vr3sgv?file=%2Findex.spec.js%3A18%2C4

test("url", () => {
  let u1 = new URL(
    "https://robotizing.net/ipfs/QmTWsPwz1wrKSgpiKa5tyC3rWkWh3Kym6ikCSmwiGPsfqd",
  );
  let u2 = new URL(
    "https://robotizing.net/ipfs/QmTWsPwz1wrKSgpiKa5tyC3rWkWh3Kym6ikCSmwiGPsfqd",
  );

  u2.searchParams.set("filename", "7777.epub");

  console.dir({
	u1,
	u2,
  })

  expect(u1).not.toEqual(u2);
  expect([u1]).not.toEqual([u2]);
});

Expected behavior

no error

Actual behavior

image

Additional context

No response

Environment

FROM node:20-bullseye
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Oct 30, 2023
@SimenB SimenB linked a pull request Nov 3, 2023 that will close this issue
Copy link

github-actions bot commented Dec 4, 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 4, 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.

1 participant