Skip to content

Commit

Permalink
test: ignore error message (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
orzyyyy committed Sep 14, 2019
1 parent ee000cf commit 3d37837
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/controller/MappingDetailDataController.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
6 changes: 6 additions & 0 deletions src/pages/__tests__/EditForm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<EditForm
Expand Down
6 changes: 6 additions & 0 deletions src/pages/__tests__/ExHentaiList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import { shallow } from 'enzyme';
import ExHentaiList from '../ExHentaiList';

describe('ExHentaiList', () => {
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});

afterAll(() => {
errorSpy.mockRestore();
});

it('render correctly', () => {
const wrapper = shallow(
<ExHentaiList
Expand Down
6 changes: 6 additions & 0 deletions src/pages/__tests__/MainPage.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ const dataSource = [
];

describe('MainPage', () => {
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});

afterAll(() => {
errorSpy.mockRestore();
});

it('render correctly', () => {
const wrapper = shallow(
<MainPage
Expand Down
6 changes: 6 additions & 0 deletions src/pages/__tests__/MainPageHeader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ const Header = Layout.Header;
import MainPageHeader from '../MainPageHeader';

describe('MainPageHeader', () => {
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});

afterAll(() => {
errorSpy.mockRestore();
});

it('render correctly', () => {
const wrapper = shallow(
<MainPageHeader Header={Header} exhentaiDateSet={[]} />,
Expand Down
6 changes: 6 additions & 0 deletions src/pages/__tests__/MainPageList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions src/pages/__tests__/MappingDetail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ const dataSource = {
};

describe('MappingDetail', () => {
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});

afterAll(() => {
errorSpy.mockRestore();
});

it('render correctly', () => {
const wrapper = mount(
<MappingDetail dataSource={dataSource} onSave={null} />,
Expand Down
6 changes: 6 additions & 0 deletions src/pages/__tests__/MarkdownDetail.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(<MarkdownDetail dataSource={'- test'} />);
expect(wrapper).toMatchSnapshot();
Expand Down
6 changes: 6 additions & 0 deletions src/pages/__tests__/MarkdownEditor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<MarkdownEditor
Expand Down
6 changes: 6 additions & 0 deletions src/pages/__tests__/TohoLoading.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import { mount } from 'enzyme';
import TohoLoading from '../TohoLoading';

describe('TohoLoading', () => {
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});

afterAll(() => {
errorSpy.mockRestore();
});

it('render correctly', () => {
jest.useFakeTimers();
const wrapper = mount(<TohoLoading currentNeta={['test1', 'test2']} />);
Expand Down

0 comments on commit 3d37837

Please sign in to comment.