Open janosh opened 2 years ago
Curious if anyone has looked into testing CSS variable props. This doesn't work (even with viteConfig.test.css set to true):
viteConfig.test.css
true
test(`CSS variables are applied`, () => { new Component({ target: document.body, props: { '--custom-bg-color': `green`, }, }) const div = document.querySelector(`.some-class`) expect(getComputedStyle(div).backgroundColor).toBe(`green`) })
Curious if anyone has looked into testing CSS variable props. This doesn't work (even with
viteConfig.test.css
set totrue
):