Skip to content

Is there a way to change handlers mid-test? #1495

Answered by jordanss1
jordanss1 asked this question in Q&A
Discussion options

You must be logged in to vote

I figured it out after a week, it was my own implementation issue, nothing to do with MSW.

I didn't realize sessionStorage was affecting my test environment which I use in the regular application. I added sessionStorage.clear() to the setupTests file to clean the sessionStorage after each test.

This can be closed/answered.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@jordanss1
Comment options

@kettanaito
Comment options

@jordanss1
Comment options

Comment options

You must be logged in to vote
3 replies
@chrisjlee
Comment options

@jordanss1
Comment options

@cmacdonnacha
Comment options

Answer selected by jordanss1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants