test: refactor, import temp update
This commit is contained in:
parent
ed83c9a3d4
commit
f3f91c5d72
@ -5,17 +5,17 @@ import ChartLineSimple from './views/charts/ChartLineSimple'
|
|||||||
import Dashboard from './views/dashboard/Dashboard.js'
|
import Dashboard from './views/dashboard/Dashboard.js'
|
||||||
|
|
||||||
|
|
||||||
it('mounts without crashing', () => {
|
it('mounts App without crashing', () => {
|
||||||
const wrapper = shallow(<App/>)
|
const wrapper = shallow(<App/>)
|
||||||
wrapper.unmount()
|
wrapper.unmount()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('mounts dashboard without crashing', () => {
|
it('mounts Dashboard without crashing', () => {
|
||||||
const wrapper = shallow(<Dashboard/>)
|
const wrapper = shallow(<Dashboard/>)
|
||||||
wrapper.unmount()
|
wrapper.unmount()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('mounts charts without crashing', () => {
|
it('mounts Charts without crashing', () => {
|
||||||
const wrapper = shallow(<ChartLineSimple/> )
|
const wrapper = shallow(<ChartLineSimple/> )
|
||||||
wrapper.unmount()
|
wrapper.unmount()
|
||||||
})
|
})
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { configure } from 'enzyme';
|
import {configure} from 'enzyme';
|
||||||
import Adapter from 'enzyme-adapter-react-16';
|
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
|
||||||
|
|
||||||
configure({ adapter: new Adapter() });
|
configure({adapter: new Adapter()});
|
||||||
|
|
||||||
if (global.document) {
|
if (global.document) {
|
||||||
document.createRange = () => ( {
|
document.createRange = () => ({
|
||||||
setStart: () => {},
|
setStart: () => {},
|
||||||
setEnd: () => {},
|
setEnd: () => {},
|
||||||
commonAncestorContainer: {
|
commonAncestorContainer: {
|
||||||
|
Loading…
Reference in New Issue
Block a user