ant-design/components/drawer/__tests__/demo-extend.test.tsx
二货爱吃白萝卜 73b3c7828d
fix: Drawer add motion deadline (#37100)
* fix: Drawer add motion deadline

* test: Update snapshot

* test: ignore motion in snapshot render
2022-08-17 11:16:01 +08:00

22 lines
472 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,
maskMotion: null,
motion: null,
};
return <MockDrawer {...newProps} />;
};
});
extendTest('drawer', {
testingLib: true,
});