You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importassertfrom"node:assert/strict";importsinonfrom"sinon";globalThis.foo=(url)=>{};constspy=sinon.spy(globalThis,"foo");constlink="https://baz.org/";constresult=foo(newURL(link));console.log("===== FIRST =====")assert.deepEqual(spy.firstCall.args[0],newURL(link));console.log("===== CONSOLE =====")console.log(spy.firstCall.args[0]);console.log("===== SECOND =====")assert.deepEqual(spy.firstCall.args[0],newURL(link));
I have reproduced the problem without Sinon. The problem comes from nodejs/node#48886
importassertfrom"node:assert/strict";constlink="https://baz.org/";consturl=newURL(link);console.log("===== FIRST =====")assert.deepEqual(url,newURL(link));console.log("===== CONSOLE =====")console.log(url);console.log("===== SECOND =====")assert.deepEqual(url,newURL(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
npm install [email protected]
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()
.The text was updated successfully, but these errors were encountered: