-
Notifications
You must be signed in to change notification settings - Fork 39
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
Cannot reliably compare Ada-based URLs (Node.js v18.17.0 & newer) #97
Comments
Is Line 416 in b8c9954
Oh... unless you're saying the property that houses |
Hey @keithamus,
Yes! Node.js v18.17.0
Node.js v18.13.0
|
Until recently, my team was using Node.js v18.13.0. Our CI system picked up Node.js v18.17.0 and started failing. Specifically, we started failing when using Chai to perform
expect(…).to.deep.equal
on URLs.After reading the changelog for v18.17.0, I see that Ada-based URLs were backported to Node.js 18 (see here).
Narrowing down some more, it seems there is a behavior change in Node.js 18.17.0 where
Symbol(query)
is lazily set on URLs wheneversearchParams
is accessed (see here). So, if you've never accessed that property of a URL,Symbol(query)
does not exist; however, once you have accessed that property,Symbol(query)
does exist. This leads to the following breakage (I'm demonstrating with Mocha):Maybe this is working as expected, but it was an unfortunate bug we hit. We have worked around it by changing our tests to no longer
expect(…).to.deep.equal
on URLs.The text was updated successfully, but these errors were encountered: