Coder Social home page Coder Social logo

Comments (4)

uittorio avatar uittorio commented on July 16, 2024

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.

tjespe avatar tjespe commented on July 16, 2024

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.

uittorio avatar uittorio commented on July 16, 2024

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.

uittorio avatar uittorio commented on July 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.