Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jest.mock does not work on .tsx files #41

Open
flunderpero opened this issue Jun 1, 2021 · 0 comments
Open

jest.mock does not work on .tsx files #41

flunderpero opened this issue Jun 1, 2021 · 0 comments

Comments

@flunderpero
Copy link

First of all, it is great that you found a workaround to make jest.mock work at all! (I originally opened evanw/esbuild#412)

That being said, it does not seem to work with .tsx files. I am getting this error:


    SyntaxError: test.spec.tsx: Unexpected token, expected "," (37:37)

    > 37 |         const sut = render(<LinkCard card={card} />)

I see you use babel-jest under the hood. Perhaps it is just a case of a missing plugin or configuration option (I am not familiar with babel at all).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant