Update test

This commit is contained in:
Oliver Wright 2019-02-10 00:45:29 +00:00
parent 89094bf09c
commit 1df469bdeb
No known key found for this signature in database
GPG Key ID: 74EA9FD649807D37
2 changed files with 6 additions and 3 deletions

View File

@ -611,3 +611,4 @@ function mapDispatchToProps(dispatch) {
}
export default withRouter(connect(() => ({}), mapDispatchToProps)(Nav));
export { Nav as NavComponent };

View File

@ -3,7 +3,7 @@ import React from 'react';
import { shallow } from 'enzyme';
import renderer from 'react-test-renderer';
import Nav from './../Nav';
import { NavComponent } from './../Nav';
describe('Nav', () => {
const props = {
@ -24,6 +24,8 @@ describe('Nav', () => {
}
},
logoutUser: jest.fn(),
newFile: jest.fn(),
newFolder: jest.fn(),
showShareModal: jest.fn(),
showErrorModal: jest.fn(),
unsavedChanges: false,
@ -39,7 +41,7 @@ describe('Nav', () => {
stopSketch: jest.fn(),
setAllAccessibleOutput: jest.fn()
};
const getWrapper = () => shallow(<Nav {...props} />);
const getWrapper = () => shallow(<NavComponent {...props} />);
test('it renders main navigation', () => {
const nav = getWrapper();
@ -48,7 +50,7 @@ describe('Nav', () => {
it('renders correctly', () => {
const tree = renderer
.create(<Nav {...props} />)
.create(<NavComponent {...props} />)
.toJSON();
expect(tree).toMatchSnapshot();
});