Skip to content
Advertisement

Tag: msw

MockServerWorker is not handling responses when using fetch in react

I’m doing test driven development in react course – I’m trying to development test for post request. Below is by react code. and the test for the post request when the button is clicked is – When the test is run I get below error – console.warn [MSW] Warning: captured a request without a matching request handler: • POST http://localhost:3000/api/1.0/users

Advertisement