vuejs / vue-jest

Jest Vue transformer
MIT License
748 stars 156 forks source link

[vue-jest next] Cannot import relative css style #347

Closed sheremet-va closed 3 years ago

sheremet-va commented 3 years ago

When importing mixins inside SFC, it throws an error:

image

The code works with Vite.

Also the test doesn't fail and ends only after jest timer runs out.

Reproductions:


- scss file (`@/style/_mixins.scss`):
```css
@mixin red {
   color: red
}

(Haven't actually checked reproduction, will try uploading it on github later)

sheremet-va commented 3 years ago

While testing reproduction, I found that I have a moduleNameMapper for scss that leads to module.exports = {}

I removed it and now it works.