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

Invariant Violation: Native module cannot be null. #239

Open
jjairojr opened this issue Jan 28, 2021 · 0 comments
Open

Invariant Violation: Native module cannot be null. #239

jjairojr opened this issue Jan 28, 2021 · 0 comments

Comments

@jjairojr
Copy link

Describe the bug
When i try to render my component in test the error pop up.

Test.spec.tsx

import { render } from '@testing-library/react-native';
import React from 'react';
import BarcodeReader from '~/components/BarcodeReader';

describe('BarcodeReader', () => {
  it('should tanana', () => {
    const { debug } = render(<BarcodeReader />);
    debug();
  });
});

Component.tsx

    <Container>
      <Text>BarCode</Text>
      <Camera onBarCodeRead={(e) => readBarcode(e)}>
        <BarcodeMaskWithOuterLayout
          backgroundColor="#333"
          maskOpacity={0.5}
          width="80%"
          height="80%"
        />
      </Camera>
    </Container>

Screenshot

Captura de Tela 2021-01-28 às 16 11 09

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