Skip to content

Testing with Jest and Webpack aliases #1909

@FateZeros

Description

@FateZeros

when I use create-react-app
my webpack aliases is

image

and my jest config is
qq20170330-230943 2x

import module like this
image

when I use npm run start , I can run my project correctly.
But, when I use npm run test, it throw an error I can not find the module which i import in the last picture .
How can I solve this ?

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