-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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]: Jest 29 with JSDom fails because of Cookie jar being more strict #13172
Comments
See salesforce/tough-cookie#246, not much to be done in Jest. You can possibly force 4.0 via a lockfile? |
since jest sets default url to localhost, this now conflicts with cookies and jsdom so passing in something like |
oh I see there they will revert it, nevermind then |
nah, will just wait for update I guess, I am not in a hurry, was only eager to try jest 29 to see if something breaks |
Happy to take a PR which passes through options to Note that jest 28 pulls in same version of |
they fixed the issue so jest 29 now runs properly |
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. |
Version
29
Steps to reproduce
Try to set and delete a cookie with default jsdom options
Expected behavior
It should delete a cookie, but throws an error
Actual behavior
Basicaly jest sets default testUrl to localhost, and now It throws an error
Cookie has domain set to the public suffix "localhost" which is a special use domain. To allow this, configure your CookieJar with {allowSpecialUseDomain:true, rejectPublicSuffixes: false}
Additional context
It is probably not a bug, but it should be possible to pass in some CookieJar options
this broke the tests
As a workaround I can set the testUrl to some other domain and then change all my tests to expect that domain instead of default one of localhost
This happened today when I updated jest from 28 to 29
Environment
The text was updated successfully, but these errors were encountered: