Skip to content
Advertisement

Module not found even though it is imported

When I run this test:

JavaScript

I get this error:

JavaScript

Reissue.tsx does import ReissueService. Do I need to mock this and if so how do I do that?

In Reissue my import is:

JavaScript

and I’m exporting:

JavaScript

In ReissueService I export:

JavaScript

Advertisement

Answer

I changed import { ReissueService } from 'src/services/ReissueService/ReissueService'; to import { ReissueService } from '../../services/ReissueService/ReissueService';

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement