Skip to content

Commit

Permalink
✅ fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Nov 4, 2019
1 parent 725f2fb commit c083d13
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ const eslintrc = {
'no-restricted-globals': 0,
'max-classes-per-file': 0,
'react/static-property-placement': 0,
'jest/no-test-callback': 0,
'jest/expect-expect': 0,
},
globals: {
gtag: true,
Expand Down
6 changes: 5 additions & 1 deletion components/breadcrumb/__tests__/router.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ describe('react router', () => {
afterAll(() => {
jest.useRealTimers();
});

// https://github.com/airbnb/enzyme/issues/875
(process.env.REACT === '15' ? it.skip : it)('react router 4', () => {
it('react router 4', () => {
if (process.env.REACT === '15') {
return;
}
const Home = withRouter(props => {
const { location, history } = props;
const pathSnippets = location.pathname.split('/').filter(i => i);
Expand Down
1 change: 1 addition & 0 deletions components/typography/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ describe('Typography', () => {
wrapper.find('TextArea').simulate('keyUp', { keyCode: KeyCode.ESC });
},
onChange => {
// eslint-disable-next-line
expect(onChange).not.toHaveBeenCalled();
},
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"@types/shallowequal": "^1.1.1",
"@types/warning": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.6.0",
"@typescript-eslint/parser": "~2.4.0",
"antd-theme-generator": "^1.1.6",
"babel-eslint": "^10.0.1",
"babel-plugin-add-react-displayname": "^0.0.5",
Expand Down
1 change: 1 addition & 0 deletions tests/shared/focusTest.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { mount } from 'enzyme';

// eslint-disable-next-line jest/no-export
export default function focusTest(Component) {
describe('focus and blur', () => {
beforeAll(() => {
Expand Down
1 change: 1 addition & 0 deletions tests/shared/mountTest.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { mount } from 'enzyme';

// eslint-disable-next-line jest/no-export
export default function mountTest(Component) {
describe(`mount and unmount`, () => {
// https://github.com/ant-design/ant-design/pull/18441
Expand Down

0 comments on commit c083d13

Please sign in to comment.