Skip to content

pmrotule/vue-jest-global-resources-bug

Repository files navigation

vue-jest-global-resources-bug

Vue project to reproduce the issue with vue-jest where relative paths imported inside a global stylesheet will throw an error. I fixed it in vuejs/vue-jest#373.

Steps to reproduce

yarn test

It should throw the following error:

Error: Can't find stylesheet to import.
  ╷
1 │ @import './unit.scss';
  │         ^^^^^^^^^^^^^
  ╵
  stdin 1:9  root stylesheet

What's causing the issue

While building this reproduction repository, even with relative paths inside a global stylesheet, the test was still green and started failing only after adding CSS modules in HelloWorld.vue.

Steps to see the fix

The branch fix is using my fork with the fix.

  • git checkout fix
  • yarn install
  • yarn test
  • The test should be green this time

About

Reproduction of the issue with relative paths in vue-jest global resources

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published