Replies: 2 comments 2 replies
-
Following |
Beta Was this translation helpful? Give feedback.
0 replies
-
Internally VE uses snapshots https://github.com/vanilla-extract-css/vanilla-extract/blob/master/tests/compiler/compiler.vitest.test.ts#L288 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am working on a project with typescript react and vanilla extract css.
So far I am enjoying it, it's what I would expect to work with type safe CSS. The problem comes when I want to apply some style testing to ensure that the styles won't change for no reason.
Is there any project or way to do snapshot testing with the generated CSS? Whenever I did a project with styled components I used this: https://github.com/styled-components/jest-styled-components
I looked at the source code and they only use a custom snapshot serializer where they add related selectors and css rules.
I had a small experiment working but you might know better what to do or if there is already something more stable for testing.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions