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
NandkishorOP13mo 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
NandkishorOP13mo 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
Jochem13mo 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
NandkishorOP13mo ago
when yu say bump up what you wan to say,.. repost or update ??
Jochem
Jochem13mo ago
just post a message in this thread, it'll push it back to the top
Nandkishor
NandkishorOP13mo ago
gotcha
Jochem
Jochem13mo 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
NandkishorOP13mo ago
okay Do you have any react server link or channel ??
Jochem
Jochem13mo ago
like I said, no
Nandkishor
NandkishorOP13mo ago
np brother
MarkBoots
MarkBoots13mo ago
maybe try codinggarden
Nandkishor
NandkishorOP13mo ago
okay thanks
Want results from more Discord servers?
Add your server