import * as React from 'react';
import { render } from '@testing-library/react';

import QrCodeScanner from '@digigov/ui/app/QrCodeScanner';

it('renders the qr code scanner', () => {
  expect(
    render(
      <React.Suspense fallback="<div>loading...</div>">
        <QrCodeScanner
          onScan={(args) => {
            console.log(args);
          }}
          onError={(args) => {
            console.log(args);
          }}
        />
      </React.Suspense>
    ).baseElement
  ).toMatchSnapshot();
});
