React Unit test case issue with MSW mock service provider

I have been doing React+TS unit testing , where I have bene mocking API response using MSW mock service provider I am able to get mock response in my redux slice but it is not updating respective state and I am not able to test respective components .. Anybody has gone through this if yes then could you please help me on this . I Have created React application using CRA.
12 Replies
Nandkishor
Nandkishor12mo ago
I have been trying various workaround but still bad luck.. I got few suggestion like do not use CRA , may be it is causing the issue. so i am kind of confuse , do i need to re-create my application using react framework like Next.js or something ?? Your views and suggestion welcomes
Nandkishor
Nandkishor12mo ago
Stack Overflow
React Unit Test : Redux State is not getting updated with mock resp...
Writing unit tests for my React (Typescript) application where I am using MSW service for Mocking response For state management using Redux toolkit . The issue is I am able to get mocked Response ...
Jochem
Jochem12mo ago
You can bump your post occasionally, but otherwise you'll have to just be patient not every question will be answered, people here volunteer their time so there's no guarantee and by occasionally, I mean once a day at the very most
Nandkishor
Nandkishor12mo ago
when yu say bump up what you wan to say,.. repost or update ??
Jochem
Jochem12mo ago
just post a message in this thread, it'll push it back to the top
Nandkishor
Nandkishor12mo ago
gotcha
Jochem
Jochem12mo ago
you might also get a better response on a more javascript focused server though. This is a server mostly focused on CSS with a little javascript. And before you ask, no I don't have any recommendations
Nandkishor
Nandkishor12mo ago
okay Do you have any react server link or channel ??
Jochem
Jochem12mo ago
like I said, no
Nandkishor
Nandkishor12mo ago
np brother
MarkBoots
MarkBoots12mo ago
maybe try codinggarden
Nandkishor
Nandkishor12mo ago
okay thanks
Want results from more Discord servers?
Add your server