Skip to content

Problem with jest when import from "." instead of "./index" #373

@ahadyekta

Description

@ahadyekta

I`m using version 3.2.0 of this module. when I import a file like this in the code

import { something } from '.';

the app itself works but if I run the unit tests (jest) it will fail because it cannot import the file. If I change the "." to "./index" , tests work fine.
I used another package called babel-plugin-root-import which is similar to this package and it does not have this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions