You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.- Create a new project or pull the minimal reproduction repo (and npm install)
2.- Add scss mixins or variables as globals
3.- Add a Demo component and use any of the mixins you added (It doesn't matter if its on a separate scss file or inside the style tags in the vue file)
4.- Create a unit test for your Demo component
4.- Run npm run serve and in a separate terminal tab run npm run test
What is expected?
When running the serve command, the application should pull your sass mixing properly.
Also you should be able to run the tests properly
What is actually happening?
Run the serve command works and you can see the application is pulling the mixin properly, but running the tests leads to an error that prevent the tests completion.
This setup is using sass (dart sass), but a similar issue happens using node-sass. Seems like if the test mode is using a different configuration. In fact in the vue.config.js file a workaround is needed to be able to load global sass mixins/vars in test mode (you can see that workaround on the minimal reproduction repo)
The text was updated successfully, but these errors were encountered:
Version
3.4.1
Reproduction link
https://github.com/eard7/test-sass-error
Environment info
Steps to reproduce
1.- Create a new project or pull the minimal reproduction repo (and npm install)
2.- Add scss mixins or variables as globals
3.- Add a Demo component and use any of the mixins you added (It doesn't matter if its on a separate scss file or inside the style tags in the vue file)
4.- Create a unit test for your Demo component
4.- Run
npm run serve
and in a separate terminal tab runnpm run test
What is expected?
When running the serve command, the application should pull your sass mixing properly.
Also you should be able to run the tests properly
What is actually happening?
Run the serve command works and you can see the application is pulling the mixin properly, but running the tests leads to an error that prevent the tests completion.
This setup is using sass (dart sass), but a similar issue happens using node-sass. Seems like if the test mode is using a different configuration. In fact in the vue.config.js file a workaround is needed to be able to load global sass mixins/vars in test mode (you can see that workaround on the minimal reproduction repo)
The text was updated successfully, but these errors were encountered: