Replies: 1 comment
-
I've just opened an issue for this case, see #1131 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm new to vanilla-extract. I have a Next JS 13 project where I use
recipes
andsprinkles
for styling. However I'm having troubles with running unit tests with Jest: when a component uses a recipe, the test fails because of anUncaught [TypeError: (0 , _stylesCss.baz) is not a function]
error (wherebaz
is the name of the recipe). Similarly when the component uses sprinkles I get anUncaught [TypeError: (0 , _sprinklesCss.sprinkles) is not a function]
error.I tried using the Jest transformer as per documentation but it didn't solve the issue. Disabling runtime styles didn't either.
I suspect this could depend on my Next app using SWC as a compiler instead of Babel, as apparently it automatically sets up its own transformers for Jest, but I'm not sure.
Does anybody know how to solve this kind of issue? Or are
recipes
andsprinkles
incompatible with a test environment using SWC?Beta Was this translation helpful? Give feedback.
All reactions