Skip to content

Windows: Cannot resolve SCSS files #181

Open
@annam002

Description

@annam002

I run into this problem on Windows with vue-jest version 3.0.4:
We are using SCSS styles for vue, and in the test, no styles are loaded.
It works fine in production, so the problem must be somewhere in vue-jest. It also works fine on Linux.

I can reproduce this in the v3 branch of vue-jest: when I try to run the test in scss.spec.js, some tests are failing and I get the following error messages:

[vue-jest]: There was an error rendering the SCSS in D:\workspaces\vue-jest\vue-jest-3.0.4\test\resources\ScssModule.vue. SCSS is fully supported by vue-jest. Still some features might throw errors. Webpack aliases are a common cause of errors. If you use Webpack aliases, please use jest's suggested way via moduleNameMapper which is supported.
[vue-jest]: Error while compiling styles: Error: File to import not found or unreadable: D:\workspaces\vue-jest\vue-jest-3.0.4\test\resources\styles\scss\D:\workspaces\vue-jest\vue-jest-3.0.4\test\resources\styles\scss\globals\global-classes-moduleNameMapper.

As you can see, the path is build up in the wrong way.

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions