Jest transform support / documentation
See original GitHub issueHi, thanks for the awesome library. Nice to see proper TypeScript support in React Native.
As Jest is the default test runner in React Native projects created by by the react-native
cli tool, it would be nice to see support or documentation on how to use this library as the transformer for Jest as well.
Of course the alternative is to use https://github.com/lozinsky/typescript-babel-jest
, but would somehow be nice to use the same transformation for tests and production.
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
Code Transformation
A transformer is a module that provides a method for transforming source files. For example, if you wanted to be able to use...
Read more >ts-jest/esm-support.md at main
A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript. - ts-jest/esm-support.md at main ...
Read more >storybook/addon-docs
Storybook Docs transforms your Storybook stories into world-class component ... Just like Storybook, Docs supports every major view layer ...
Read more >Configuring package.json · Jest
Jest's configuration can be defined in the package.json file of your project or through the ... transform [object<string, string>]; transformIgnorePatterns ...
Read more >Testing with Jest
Learn how to set up and configure the jest-expo package to write unit tests and ... This can be done by including the...
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
I just try preprocess jest tests with this module and it seems to work well with small glue code. Although my test suite is small and I may not detect all edge cases, it would be good to have this “glue” in package itself and improve it together.
My config: jest/preprocessor.js (actually it is adaptation of RN jest preprocessor)
package.json (jest config part)
What do you think?
Happy to have your input @GeeWee !
I agree that it makes most sense to focus on ts-jest. It should work, and it has a lot of useful things that react-native-typescript-transformer lacks.