Skip to content

Commit

Permalink
test: back of coverage (ant-design#34964)
Browse files Browse the repository at this point in the history
* test: fix coverage

* chore: bump bisheng

* chore: clean up

* chore: update deps

* chore: test coverage
  • Loading branch information
zombieJ authored Apr 11, 2022
1 parent 494c55d commit 688422b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 53 deletions.
50 changes: 0 additions & 50 deletions components/_util/compatible.ts

This file was deleted.

12 changes: 12 additions & 0 deletions components/menu/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,4 +928,16 @@ describe('Menu', () => {
expect(wrapper.find('li.ant-menu-item-divider').length).toBe(2);
expect(wrapper.find('li.ant-menu-item-divider-dashed').length).toBe(1);
});

it('expandIcon', () => {
const wrapper = mount(
<Menu defaultOpenKeys={['1']} mode="inline" expandIcon={() => <span className="bamboo" />}>
<SubMenu key="1" title="submenu1">
<Menu.Item key="submenu1">Option 1</Menu.Item>
</SubMenu>
</Menu>,
);

expect(wrapper.exists('.bamboo')).toBeTruthy();
});
});
2 changes: 1 addition & 1 deletion components/modal/confirm.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import { render as reactRender, unmount as reactUnmount } from 'rc-util/lib/React/render';
import InfoCircleOutlined from '@ant-design/icons/InfoCircleOutlined';
import CheckCircleOutlined from '@ant-design/icons/CheckCircleOutlined';
import CloseCircleOutlined from '@ant-design/icons/CloseCircleOutlined';
Expand All @@ -8,7 +9,6 @@ import type { ModalFuncProps } from './Modal';
import ConfirmDialog from './ConfirmDialog';
import { globalConfig } from '../config-provider';
import devWarning from '../_util/devWarning';
import { reactRender, reactUnmount } from '../_util/compatible';
import destroyFns from './destroyFns';

let defaultRootPrefixCls = '';
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"rc-tree-select": "~5.1.1",
"rc-trigger": "^5.2.10",
"rc-upload": "~4.3.0",
"rc-util": "^5.19.3",
"rc-util": "^5.20.0",
"scroll-into-view-if-needed": "^2.2.25"
},
"devDependencies": {
Expand Down Expand Up @@ -188,7 +188,7 @@
"argos-cli": "^0.3.0",
"array-move": "^4.0.0",
"babel-plugin-add-react-displayname": "^0.0.5",
"bisheng": "^3.2.0",
"bisheng": "^3.2.1",
"bisheng-plugin-description": "^0.1.4",
"bisheng-plugin-react": "^1.2.0",
"bisheng-plugin-toc": "^0.4.4",
Expand Down

0 comments on commit 688422b

Please sign in to comment.