From f3f91c5d721754a2dac26143f312415c94c7ed68 Mon Sep 17 00:00:00 2001 From: xidedix Date: Mon, 14 Dec 2020 18:12:10 +0100 Subject: [PATCH] test: refactor, import temp update --- src/App.test.js | 6 +++--- src/setupTests.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/App.test.js b/src/App.test.js index 0161f44..87ba6fb 100644 --- a/src/App.test.js +++ b/src/App.test.js @@ -5,17 +5,17 @@ import ChartLineSimple from './views/charts/ChartLineSimple' import Dashboard from './views/dashboard/Dashboard.js' -it('mounts without crashing', () => { +it('mounts App without crashing', () => { const wrapper = shallow() wrapper.unmount() }) -it('mounts dashboard without crashing', () => { +it('mounts Dashboard without crashing', () => { const wrapper = shallow() wrapper.unmount() }) -it('mounts charts without crashing', () => { +it('mounts Charts without crashing', () => { const wrapper = shallow( ) wrapper.unmount() }) diff --git a/src/setupTests.js b/src/setupTests.js index 8332054..6f2c9fc 100644 --- a/src/setupTests.js +++ b/src/setupTests.js @@ -1,10 +1,10 @@ -import { configure } from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; +import {configure} from 'enzyme'; +import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; -configure({ adapter: new Adapter() }); +configure({adapter: new Adapter()}); if (global.document) { - document.createRange = () => ( { + document.createRange = () => ({ setStart: () => {}, setEnd: () => {}, commonAncestorContainer: {