2023-05-06 15:49:37 +08:00
|
|
|
import * as React from 'react';
|
2024-04-08 14:04:08 +08:00
|
|
|
|
2022-07-25 21:04:43 +08:00
|
|
|
import { extendTest } from '../../../tests/shared/demoTest';
|
|
|
|
|
2023-06-07 21:59:21 +08:00
|
|
|
jest.mock('rc-drawer', () => {
|
|
|
|
const Drawer = jest.requireActual('rc-drawer');
|
2022-07-25 21:04:43 +08:00
|
|
|
const MockDrawer = Drawer.default;
|
2023-06-07 21:59:21 +08:00
|
|
|
return (props: any) => {
|
|
|
|
const newProps = {
|
|
|
|
...props,
|
|
|
|
open: true,
|
|
|
|
getContainer: false,
|
|
|
|
maskMotion: null,
|
|
|
|
motion: null,
|
|
|
|
};
|
|
|
|
return <MockDrawer {...newProps} />;
|
2022-07-25 21:04:43 +08:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
extendTest('drawer', {
|
|
|
|
testingLib: true,
|
|
|
|
});
|