import React from 'react'; import {create, act, ReactTestRenderer} from 'react-test-renderer'; import {ColorPicker} from '../ColorPicker'; import MasterVariantData from './mock/MasterVariantData.json'; let component: ReactTestRenderer; act(() => { component = create( {}} variantsDataArray={[MasterVariantData]} /> ); }); describe('ColorPicker', () => { it('matches snapshot', () => { expect(component.toJSON()).toMatchSnapshot(); }); });