import React from 'react'; import { BrowserRouter } from 'react-router-dom'; import TestRenderer from 'react-test-renderer'; import { GridItem } from '../../src/js/components/GridItem'; import { core } from '../state'; jest.mock('react-redux', () => ({ useSelector: jest.fn(), useDispatch: () => jest.fn(), })); jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), useHistory: () => ({ location: { pathname: 'iris.local:6680/iris/artist/123:abc', }, }), useLocation: () => ({ pathname: 'iris.local:6680/iris/artist/123:abc', }), })); describe('', () => { it('should handle album', () => { const result = TestRenderer.create( ).toJSON(); expect(result).toMatchSnapshot(); }); it('should handle artist', () => { const result = TestRenderer.create( ).toJSON(); expect(result).toMatchSnapshot(); }); it('should handle playlist', () => { const result = TestRenderer.create( ).toJSON(); expect(result).toMatchSnapshot(); }); });