Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: ignore error message #218

Merged
merged 1 commit into from
Sep 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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