ant-design/components/drawer/__tests__/demo-extend.test.tsx
二货机器人 24be945ea8
fix: Not work in old browser (#36748)
* fix: Drawer contentWrapperStyle logic

* fix: Update style

* test: Update snapshot

* test: More test case
2022-07-27 23:44:45 +08:00

20 lines
428 B
TypeScript

import * as React from 'react';
import { extendTest } from '../../../tests/shared/demoTest';
jest.mock('rc-drawer', () => {
const Drawer = jest.requireActual('rc-drawer');
const MockDrawer = Drawer.default;
return (props: any) => {
const newProps = {
...props,
open: true,
getContainer: false,
};
return <MockDrawer {...newProps} />;
};
});
extendTest('drawer', {
testingLib: true,
});