Skip to content

Jest.mock does not resolve modules correctly when NODE_PATH is set #1271

Closed
@dapids

Description

@dapids

Description

Running tests with NODE_PATH=src npm test.

Expected behavior

jest.mock('my_module') should be resolved to src/my_module.

Actual behavior

jest.mock('my_module') does not resolve to src/my_module.

Environment

  1. npm ls react-scripts (if you haven’t ejected): 0.8.4
  2. node -v: v6.9.2
  3. npm -v: 3.10.9

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