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

fix: support multiple response cookies using "ctx.cookie()" #1311

Merged
merged 2 commits into from Jul 4, 2022

Conversation

kettanaito
Copy link
Member

Changes

  • Response cookie headers are not set using "append" and not "set".
  • Adds a clearCookies() utility that clears JSDOM cookies. Doing document.cookie = '' just adds a new empty cookie, doesn't clear the cookies.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 4, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 98eb01e:

Sandbox Source
MSW React Configuration
distracted-chandrasekhar-nob6s2 Issue #1290

@kettanaito kettanaito merged commit 66c3ad8 into main Jul 4, 2022
@kettanaito kettanaito deleted the fix/res-cookie-append branch July 4, 2022 12:40
@kettanaito
Copy link
Member Author

Released: v0.43.1 🎉

This has been released in v0.43.1!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot set multiple "Set-Cookie" response headers
1 participant