react-native-nfc-manager icon indicating copy to clipboard operation
react-native-nfc-manager copied to clipboard

Jest testing: "Invariant Violation: Native module cannot be null."

Open lindan4 opened this issue 3 years ago • 2 comments

I am looking to integrate a bare Expo application with Jest for testing. I am working on with Jest but am running into the following issue.

FAIL   iOS  __tests__/App.test.js
  ● Test suite failed to run

    Invariant Violation: Native module cannot be null.

      46 | import _ from "lodash";
      47 | import { manipulateAsync, SaveFormat } from "expo-image-manipulator";
    > 48 | import NfcManager, { NfcEvents, Ndef } from "react-native-nfc-manager";
         | ^

Someone else had also opened an issue but it was closed due to inactivity. I have shallow rendered the application but still have this issue. Is there any way to fix this or will it soon be addressed.

lindan4 avatar Apr 11 '22 15:04 lindan4

Experiencing the same issue too. Did you manage to work around it @lindan4 ?

joekabogo avatar Apr 25 '22 09:04 joekabogo

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 26 '22 02:07 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Aug 11 '22 02:08 github-actions[bot]