jest.mock does not work on .tsx files
flunderpero opened this issue · 0 comments
flunderpero commented
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).