Skip to content

ymoon715/rtk-query-msw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Testing RTK-Query with Jest/Testing-Library with MSW as a API mock

How to run test

npm i
npm run test

What seems to be the problem

The problem may be msw library's issue. This seems to be the case as whenever I try to test the error case first, both success/error case passes, where if I try to test the success case first, the error case always fails. I have 4 different test files showing this.

server.resetHandlers() doesn't seem to work properly with MSW

As you can see my 4 different test cases, server.resetHandlers() seems to fail whenever I test the error case SECOND, or after the success case.

About

issue with MSW when using RTK-query

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published