Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing file: __mocks__/DateTimePicker.tsx #1

Open
boxabirds opened this issue Nov 26, 2022 · 0 comments
Open

Missing file: __mocks__/DateTimePicker.tsx #1

boxabirds opened this issue Nov 26, 2022 · 0 comments

Comments

@boxabirds
Copy link
Contributor

Hi thanks for this code!
I've been trying to run tests in your demo app and have hit this issue when running yarn jest

 FAIL  src/components/button/test.tsx
  ● Test suite failed to run

    Configuration error:

    Could not locate module @react-native-community/datetimepicker mapped as:
    /Users/julian/expts/react-native-n64-voter-app/__mocks__/DateTimePicker.tsx.

    Please check your configuration for these entries:
    {
      "moduleNameMapper": {
        "/@react-native-community\/datetimepicker/": "/Users/<me>/expts/react-native-n64-voter-app/__mocks__/DateTimePicker.tsx"
      },
      "resolver": undefined
    }

      23 | jest.mock("@react-native-community/netinfo", () => mockRNCNetInfo);
      24 |
    > 25 | jest.mock("@react-native-community/datetimepicker", () => jest.fn());
         |      ^
      26 |
      27 | jest.mock("react-native/Libraries/Animated/NativeAnimatedHelper");
      28 | jest.mock("react-i18next", () => ({

      at createNoMappedModuleFoundError (node_modules/jest-resolve/build/index.js:551:17)
      at Object.<anonymous> (jest.setup.js:25:6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant