-
Notifications
You must be signed in to change notification settings - Fork 37
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
error: Expression expected #40
Comments
What Jest version are you on? |
|
I got the babel-jest working and that is good enough for me. Would like to switch to swc tho |
@bodazhao It works on several of our projects but fails on one that uses jsx instead of tsx and has some
All of them use Shall we reopen this issue? |
I think #44 cause the issue? |
Currently porting a test suite and had this issue. I had to set
|
I ran into
|
@sanchezg7 God bless you, my dear savior :) |
We are currently upgrading to NextJS 12, which is using SWC rather than babel.
I wanted to give
@swc/jest
a try because of ESM module issues with babel-jest:SyntaxError: Cannot use import statement outside a module
After switching from
'^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/node_modules/babel-jest'
to
'^.+\\.(t|j)sx?$': '@swc/jest'
I am getting the following errors:
Is
@swc/jest
not supposed to work withjsx
/tsx
files? The regrex implies that it does work with it. Any suggestions?The text was updated successfully, but these errors were encountered: