React native jest runtime
See original GitHub issueSorry about this, just an heads up on https://github.com/mswjs/node-request-interceptor/pull/37
This, while it correctly allow me to run msw on the application, it broke my tests. Apparently, while running my jest tests, the overrideModules.native.ts
is also loaded, which is not the behaviour I was expecting.
I’ll look more into this tonight.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Testing React Native Apps - Jest
Run yarn test to run tests with Jest. ... If you are upgrading your react-native application and previously used the jest-react-native preset, ...
Read more >Testing - React Native
This guide introduces React Native developers to the key concepts behind testing, how to write good tests, and what kinds of tests you...
Read more >Testing Environments - React
Test runners like Jest, mocha, ava let you write test suites as regular JavaScript, and run them as part of your development process....
Read more >Jest failed after upgrade to react-native 0.64 #703 - GitHub
Recently I upgraded my project to 0.64 version and faced this issue when I run jest. The same error happened even after I...
Read more >jest-runtime examples - CodeSandbox
Learn how to use jest-runtime by viewing and forking example apps that make use of jest-runtime on CodeSandbox. ; projet3 ; responsive-react-app ;...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That should be fine. In RN development you should use
msw/native
, while in testsmsw/node
. I find that quite straightforward, even if they promise the same API.With the latest version (
0.5.0
) that should work already, but I haven’t tested that yet.Hi kettanaito; sorry for the absence; yep I think it’s the way to go as well. It would have been nice to have the same setup/import for both jest and rn, but the user can likely get there using jest module aliases.
If there’s anything that worry me here is that both the node and the native package should expose the same api interface, as the user will use it interchangeably ( between jest and rn ) and expect the same behaviour. But it’s probably okay.