Closed regseb closed 1 year ago
I have reproduced the problem without Sinon. The problem comes from https://github.com/nodejs/node/issues/48886
import assert from "node:assert/strict";
const link = "https://baz.org/";
const url = new URL(link);
console.log("===== FIRST =====")
assert.deepEqual(url, new URL(link));
console.log("===== CONSOLE =====")
console.log(url);
console.log("===== SECOND =====")
assert.deepEqual(url, new URL(link));
Describe the bug With Node.js 18.17.0, spied URLs are different from supplied URLs.
Files
package.json
index.js
To Reproduce Steps to reproduce the behavior:
npm install
node --version
node index.js
Use previous Node.js version:
npm install node@18.16.1
node_modules/.bin/node --version
node_modules/.bin/node index.js
Expected behavior I'm expecting assert to find no difference between the two URLs.
Context (please complete the following information):
Additional context
console.log()
.