Skip to content

Jest ignoring tests inside src/node_modules #1042

Closed
@spadin

Description

@spadin

I created a src/node_modules directory so I can have shared code I re-use throughout my project.

So rather than doing

import MyComponent from '../../../../shared/MyComponent';

I could write

import MyComponent from 'shared/MyComponent';

This works great, except when I add a test MyComponent.test.js. It isn't "seen" by Jest.

Not sure if this is a supported use case, it might just be a nice-to-have.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions