Skip to content

test failure with "Cannot find module ../WifiService from SampleService.test.ts" #290

@emanuelb

Description

@emanuelb

Running yarn jest

Result:

    Cannot find module '../WifiService' from 'SampleService.test.ts'

       7 | 
       8 | 
    >  9 | jest.mock('../WifiService', () => ({
         |      ^
      10 |   getWifiList: jest.fn().mockResolvedValue(['ssdid']),
      11 | }));
      12 | 

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:299:11)
      at Object.<anonymous> (src/services/__tests__/SampleService.test.ts:9:6)

The WifiService.ts file was removed at: 4ff7b48

But the related test code wasn't removed:

jest.mock('../WifiService', () => ({
getWifiList: jest.fn().mockResolvedValue(['ssdid']),
}));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions