Skip to content

Handle asset types in Jest #1317

Open
Open
@eddyerburgh

Description

@eddyerburgh

By default, Jest can't handle asset imports.

We need to add a workaround like this:

"jest": {
  "transform": {
    ".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub"
  }
}

I'm happy to make a PR.

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