Closed uittorio closed 4 years ago
Two questions:
You can use babel-jest instead of ts-jest to run your test. Babel is used in combination of typescript to benefit from the type safety.
We don't have any plan to create a transformer for babel.
@uittorio Any chance of reviving this? I've found TS-Jest to become unbearably slow. Setting isolatedModules: true
unfortunately doesn't help.
Hi @imjordanxd! Sorry for the late reply! I think we can improve the configuration to make it faster! Can you share your project so I can see what we can do?
As we mentioned before babel ts auto mock would be a completely different project!
Hey @uittorio, I'm working on a private project so unfortunately, I can't share it. Are there any details you require? At a very high level, I'm using the basic installation here to test my React application with testing-library
.
Hi @uittorio, just following up on this to see if you have any suggestions?
@Pmyl I can tell you a benefit. Relay requires the babel-plugin-relay to work (replaces GraphQL-tags with compiled artifacts). And for unittesting fragments, the plugin is required to also transpile the test code. Thus Relay and ts-auto-mock cannot be used together which is really sad
When babel is used in combination with Typescript is not possible to use ts-auto-mock because the code is compiled by Babel.
This issue opened in typescirpt-is explain the scenario (https://github.com/woutervh-/typescript-is/issues/18)
A possible solution would be to write another plugin for babel
I've opened this issue as a placeholder, I'm not sure yet how much work is involved to achieve this.