import ScanCode from '../../../../src/web/actions/scanCode/ScanCodeComponent';
import renderer from 'react-test-renderer';
import React from 'react';

describe('test src/web/actions/scanCode/ScanCodeComponent', () => {
    /**
     * https://jestjs.io/docs/tutorial-react
     */
    it('test ScanCode', () => {
        const component = renderer.create(
            <ScanCode root={''} options={{
                onlyFromCamera: false,
                scanType: ['barCode', 'qrCode'],
                success: () => {},
                fail: () => {},
                complete: () => {},
                enableDefaultBehavior: true,
            }}></ScanCode>
        );
        let tree = component.toJSON();
        expect(tree).toMatchSnapshot();
    })
})