Skip to content

Using CSS Modules and PostCSS Nested doesn't work in tests #459

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

Closed
talkor opened this issue Mar 10, 2022 · 2 comments
Closed

Using CSS Modules and PostCSS Nested doesn't work in tests #459

talkor opened this issue Mar 10, 2022 · 2 comments

Comments

@talkor
Copy link

talkor commented Mar 10, 2022

When using <style module> along with postcss-nested results in an error in tests:

undefined:29:3: missing '}'

Using:
vue: 2.6.11
postcss-nested: 4.2.3
any version of vue2-jest

Example repo:
https://github.com/talkor/vue-jest-bug

Run yarn test:unit to get the above error

Is there a way to use both in tests without "losing" the class names (i.e. empty classes or undefined in class names in tests)?
Thanks

@lmiller1990
Copy link
Member

I wonder if this PR (now released under vue/vue3-jest and vue/vue2-jest, both v27) fixed your issue? #425 (comment)

@talkor
Copy link
Author

talkor commented May 2, 2022

I wonder if this PR (now released under vue/vue3-jest and vue/vue2-jest, both v27) fixed your issue? #425 (comment)

It is working well now in v27, thanks @lmiller1990 !

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

2 participants