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

TooltipProvider Jest encountered an unexpected token #2950

Open
Brokenwing5 opened this issue Jun 12, 2024 · 0 comments
Open

TooltipProvider Jest encountered an unexpected token #2950

Brokenwing5 opened this issue Jun 12, 2024 · 0 comments

Comments

@Brokenwing5
Copy link

Question

Hi guys, I'm writing a jest test for a component that has the TooltipProvider as a dependency and I've googled and chat gpt'd my way around so many different configurations to try and resolve this error

Jest encountered an unexpected token

Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

Support for the experimental syntax 'jsx' isn't currently enabled (8:5):

   6 |
   7 |   return (
>  8 |     <Tooltip.Provider

I've tried stubbing the radix/tooltip package with module name mapper, I've tried babel plugins, babel presets, transformignore patterns. I feel like I'm running out of possible solutions here, has anyone run into this issue and resolved it?

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