joyent-portal/packages/cp-frontend/test/unit/containers/services/menu.js

32 lines
609 B
JavaScript
Raw Normal View History

/**
* @jest-environment jsdom
*/
import React from 'react';
import renderer from 'react-test-renderer';
import 'jest-styled-components';
import { ServicesMenu } from '@containers/services/menu.js';
import { Router, Store } from '../../mocks';
it('renders <ServicesMenu /> without throwing', () => {
const props = {
location: {
pathname: ''
},
history: {
push: () => {}
}
2017-08-28 22:21:08 +03:00
};
const tree = renderer
.create(
<Store>
<Router>
2017-08-28 22:21:08 +03:00
<ServicesMenu {...props} />
</Router>
</Store>
)
.toJSON();
expect(tree).toMatchSnapshot();
});