import React from 'react'; import Navigation from './index'; import Link from '../../blocks/Link'; const data = { Link: Link, items: [ { name: 'Name 1', LinkProps: { to: '/', children: 'Parent page', }, items: [ { name: 'Child Name 1', LinkProps: { to: '/', children: 'Child page', }, }, ], }, { name: 'Name 2', LinkProps: { to: '/', children: 'Parent page', }, }, ], }; describe('Navigation', () => { const defaultElement = ; let wrapper; beforeEach(() => { wrapper = shallow(defaultElement); }); it('should render correctly', () => { expect(wrapper).toMatchSnapshot(); }); });