@@ -119,6 +119,9 @@ | |||
"<rootDir>/config/polyfills.js", | |||
"<rootDir>/config/jest/SetupTestEnvironment.js" | |||
], | |||
"snapshotSerializers": [ | |||
"enzyme-to-json/serializer" | |||
], | |||
"testPathIgnorePatterns": [ | |||
"<rootDir>/node_modules", | |||
"<rootDir>/src/main/webapp", |
@@ -19,7 +19,6 @@ | |||
*/ | |||
import React from 'react'; | |||
import { shallow } from 'enzyme'; | |||
import toJSON from 'enzyme-to-json'; | |||
import ComponentNavMenu from '../ComponentNavMenu'; | |||
it('should work with extensions', () => { | |||
@@ -29,5 +28,5 @@ it('should work with extensions', () => { | |||
extensions: [{ id: 'foo', name: 'Foo' }] | |||
}; | |||
const wrapper = shallow(<ComponentNavMenu component={component} conf={conf}/>); | |||
expect(toJSON(wrapper)).toMatchSnapshot(); | |||
expect(wrapper).toMatchSnapshot(); | |||
}); |
@@ -19,7 +19,6 @@ | |||
*/ | |||
import React from 'react'; | |||
import { shallow } from 'enzyme'; | |||
import toJSON from 'enzyme-to-json'; | |||
import GlobalNavMenu from '../GlobalNavMenu'; | |||
it('should work with extensions', () => { | |||
@@ -31,5 +30,5 @@ it('should work with extensions', () => { | |||
permissions: { global: [] } | |||
}; | |||
const wrapper = shallow(<GlobalNavMenu appState={appState} currentUser={currentUser}/>); | |||
expect(toJSON(wrapper)).toMatchSnapshot(); | |||
expect(wrapper).toMatchSnapshot(); | |||
}); |
@@ -19,11 +19,10 @@ | |||
*/ | |||
import React from 'react'; | |||
import { shallow } from 'enzyme'; | |||
import toJSON from 'enzyme-to-json'; | |||
import SettingsNav from '../SettingsNav'; | |||
it('should work with extensions', () => { | |||
const extensions = [{ id: 'foo', name: 'Foo' }]; | |||
const wrapper = shallow(<SettingsNav extensions={extensions}/>); | |||
expect(toJSON(wrapper)).toMatchSnapshot(); | |||
expect(wrapper).toMatchSnapshot(); | |||
}); |
@@ -19,7 +19,6 @@ | |||
*/ | |||
import React from 'react'; | |||
import { shallow } from 'enzyme'; | |||
import toJSON from 'enzyme-to-json'; | |||
import ProjectCardMeasures from '../ProjectCardMeasures'; | |||
it('should not render coverage', () => { | |||
@@ -32,7 +31,7 @@ it('should not render coverage', () => { | |||
'sqale_rating': '1.0' | |||
}; | |||
const wrapper = shallow(<ProjectCardMeasures measures={measures}/>); | |||
expect(toJSON(wrapper)).toMatchSnapshot(); | |||
expect(wrapper).toMatchSnapshot(); | |||
}); | |||
it('should not render duplications', () => { | |||
@@ -45,7 +44,7 @@ it('should not render duplications', () => { | |||
'sqale_rating': '1.0' | |||
}; | |||
const wrapper = shallow(<ProjectCardMeasures measures={measures}/>); | |||
expect(toJSON(wrapper)).toMatchSnapshot(); | |||
expect(wrapper).toMatchSnapshot(); | |||
}); | |||
it('should not render ncloc', () => { | |||
@@ -58,5 +57,5 @@ it('should not render ncloc', () => { | |||
'sqale_rating': '1.0' | |||
}; | |||
const wrapper = shallow(<ProjectCardMeasures measures={measures}/>); | |||
expect(toJSON(wrapper)).toMatchSnapshot(); | |||
expect(wrapper).toMatchSnapshot(); | |||
}); |