diff --git a/src/controller/MappingDetailDataController.tsx b/src/controller/MappingDetailDataController.tsx index 5d67bfa18..9b915f0de 100644 --- a/src/controller/MappingDetailDataController.tsx +++ b/src/controller/MappingDetailDataController.tsx @@ -1,6 +1,6 @@ import React from 'react'; import MappingDetail from '../pages/MappingDetail'; -import { DataSource } from 'mini-xmind/lib/canvas'; +import { DataSource } from 'mini-xmind/lib/canvas/core'; import { useFetchDocumentData } from '../hooks/useFetchDocumentData'; import { MarkdownEditorSaveProps, diff --git a/src/pages/__tests__/EditForm.test.js b/src/pages/__tests__/EditForm.test.js index d22011024..59af3ee7c 100644 --- a/src/pages/__tests__/EditForm.test.js +++ b/src/pages/__tests__/EditForm.test.js @@ -27,6 +27,12 @@ const dataItem = { function noop() {} describe('EditForm', () => { + const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + + afterAll(() => { + errorSpy.mockRestore(); + }); + it('render correctly', () => { const wrapper = mount( { + const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + + afterAll(() => { + errorSpy.mockRestore(); + }); + it('render correctly', () => { const wrapper = shallow( { + const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + + afterAll(() => { + errorSpy.mockRestore(); + }); + it('render correctly', () => { const wrapper = shallow( { + const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + + afterAll(() => { + errorSpy.mockRestore(); + }); + it('render correctly', () => { const wrapper = shallow( , diff --git a/src/pages/__tests__/MainPageList.test.js b/src/pages/__tests__/MainPageList.test.js index 4bfae0ace..7342401bc 100644 --- a/src/pages/__tests__/MainPageList.test.js +++ b/src/pages/__tests__/MainPageList.test.js @@ -26,6 +26,12 @@ const dataSource = [ ]; describe('MainPageList', () => { + const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + + afterAll(() => { + errorSpy.mockRestore(); + }); + it('render correctly', () => { const onDelete = jest.fn(); const onEdit = jest.fn(); diff --git a/src/pages/__tests__/MappingDetail.test.js b/src/pages/__tests__/MappingDetail.test.js index 8885aab99..39747e88b 100644 --- a/src/pages/__tests__/MappingDetail.test.js +++ b/src/pages/__tests__/MappingDetail.test.js @@ -142,6 +142,12 @@ const dataSource = { }; describe('MappingDetail', () => { + const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + + afterAll(() => { + errorSpy.mockRestore(); + }); + it('render correctly', () => { const wrapper = mount( , diff --git a/src/pages/__tests__/MarkdownDetail.test.js b/src/pages/__tests__/MarkdownDetail.test.js index 1b71df206..c5ef78440 100644 --- a/src/pages/__tests__/MarkdownDetail.test.js +++ b/src/pages/__tests__/MarkdownDetail.test.js @@ -3,6 +3,12 @@ import { mount } from 'enzyme'; import MarkdownDetail from '../MarkdownDetail'; describe('MarkdownDetail', () => { + const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + + afterAll(() => { + errorSpy.mockRestore(); + }); + it('render correctly', () => { const wrapper = mount(); expect(wrapper).toMatchSnapshot(); diff --git a/src/pages/__tests__/MarkdownEditor.test.js b/src/pages/__tests__/MarkdownEditor.test.js index 8e38a20bd..ffc823c12 100644 --- a/src/pages/__tests__/MarkdownEditor.test.js +++ b/src/pages/__tests__/MarkdownEditor.test.js @@ -3,6 +3,12 @@ import { mount } from 'enzyme'; import MarkdownEditor from '../MarkdownEditor'; describe('MarkdownEditor', () => { + const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + + afterAll(() => { + errorSpy.mockRestore(); + }); + it('render correctly', () => { const wrapper = mount( { + const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + + afterAll(() => { + errorSpy.mockRestore(); + }); + it('render correctly', () => { jest.useFakeTimers(); const wrapper = mount();