Skip to content

Issues when using with Jest #84

@adamchipperfield

Description

@adamchipperfield

This is a question and not an issue with this module (which I love, it's been super helpful in countless projects for me!)

I have Jest set up to run tests on my components, but as soon as I added SVGs into my components Jest started to throw errors. The main error I get is:

Could not locate module @/assets/icons/misc-close.svg?inline mapped as: /path/to/nuxt/$1.

I've tried to use a number of methods, including the one vue-svg-loader suggests, but nothing works. I even tried removing ?inline from the import but the same error persists.

Can anyone provide any guidance here please?

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