MohGovIL / hamagen-react-native

Israel's Ministry of Health's COVID-19 Exposure Prevention App
https://health.gov.il/
MIT License
508 stars 153 forks source link

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

Open emanuelb opened 3 years ago

emanuelb commented 3 years ago

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: https://github.com/MohGovIL/hamagen-react-native/commit/4ff7b4815801abac19a8f5c71cf91a317d1e12b9

But the related test code wasn't removed: https://github.com/MohGovIL/hamagen-react-native/blob/d2bc72dace4ab77ab7fef3dc603f25c59a4b88f7/src/services/__tests__/SampleService.test.ts#L9-L11