import React from 'react'; import { shallow } from 'enzyme'; import { IndexPage } from 'pages/index'; const queryResult = { site: { siteMetadata: { defaultSyntax: 'testJs', syntaxList: [ { id: 'testJS', name: 'Testing JS' }, { id: 'other', name: 'Other' } ] } } }; describe('Index Page', () => { test('rendering', () => { const component = shallow( ); expect(component).toMatchSnapshot(); }); test('rendering with an expression on the URL', () => { const component = shallow( ); expect(component).toMatchSnapshot(); }); });