Comments (4)
Hello @tjespe, thank you for reporting the issue. I believe as you mentioned that the issue is on jest side, it doesnt allow more than one transformer at the same time. In the issue you’ve posted they also provide an example to how to add more than one transformer. Could you please tell me which other transformer you are using so I can provide an example in jest-ts-auto-mock
from jest-ts-auto-mock.
I was using the other default jest transforms that react-scripts had set up automatically. I don’t have the code now, but a list of the transformers is probably available in the react-scripts repository.
I fixed my problem by using craco
to override the default settings, and put the ts-jest
compiler as the first entry in the transformers
object with a regex that only included .ts
files, not .tsx
.
from jest-ts-auto-mock.
I'm glad you've found an alternative solution.
I've added a https://github.com/Typescript-TDD/ts-auto-mock/issues/107 to an existing issue to improve documentation for future reference.
from jest-ts-auto-mock.
I've created an article that explains how to use it with jest.. and there is also a documented guide in the website
from jest-ts-auto-mock.
Related Issues (11)
- the config for setupfiles doesnt work
- Jest encountered an unexpected token, help needed HOT 8
- TypeError: Cannot read property 'ids' of undefined, help needed HOT 5
- Example does not work HOT 8
- Uses an old version of ts-auto-mock HOT 4
- Support for Typescript 4 HOT 3
- Update readme about supported jest versions
- FEATURE REQUEST | Support for @swc/jest HOT 6
- Jest 27 support HOT 3
- Add support for Jest 28 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jest-ts-auto-mock.