import React, {useRef} from 'react'; import {create, act, ReactTestRenderer} from 'react-test-renderer'; import {ShopLinks} from '../ShopLinks'; const Wrapper = () => { const ref = useRef(null); return (
); }; let component: ReactTestRenderer; act(() => { component = create(); }); describe('ShopLinks', () => { it('matches snapshot', () => { expect(component.toJSON()).toMatchSnapshot(); }); });