Skip to content

External SCSS throws warnings when tests are run for the first time #178

Open
@stinovlas

Description

@stinovlas

After upgrading jest to 24.8.0, I got a bunch of warnings regarding SCSS in my Vue components. I mitigated most of them by setting moduleNameMapper, as suggested in the warning messages. However, some of them didn't disappear. It seems that linking external scss module like this is source of the problem:

<style lang="scss" module src="../MyCustomStyles.module.scss"/>

The warning goes as this:

[vue-jest]: There was an error rendering the SCSS in /home/user/path/to/my/project/components/MyComponent.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: No input specified: provide a file name or a source string to process

I'm using vue-jest@3.0.4, jest@24.8.0 and vue@2.6.10.

If anyone has any idea what am I doing wrong, I'd be glad for help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions