Skip to content

Commit 8a8e3c0

Browse files
committed
rm test
1 parent c9bcbd4 commit 8a8e3c0

File tree

1 file changed

+1
-39
lines changed

1 file changed

+1
-39
lines changed

tests/index.spec.tsx

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { mount } from 'enzyme';
22
import * as React from 'react';
33
import toJson from 'enzyme-to-json';
4-
import Drawer from "../src";
4+
import Drawer from '../src';
55

66
function Div(props) {
77
const { show, ...otherProps } = props;
@@ -29,21 +29,6 @@ function DrawerComp(props: { open?: boolean }) {
2929
);
3030
}
3131

32-
function TowDrawer(props: { oneOpen?: boolean; towOpen?: boolean }) {
33-
return (
34-
<div className="tow-wrapper">
35-
<div
36-
id="a"
37-
className="a"
38-
style={{ position: 'absolute', top: 0, left: 0 }}
39-
>
40-
<Drawer getContainer="#a" open={props.oneOpen} />
41-
</div>
42-
<Drawer open={props.towOpen} />
43-
</div>
44-
);
45-
}
46-
4732
function createClientXY(x: number, y: number) {
4833
return { clientX: x, clientY: y };
4934
}
@@ -232,27 +217,4 @@ describe('rc-drawer-menu', () => {
232217
});
233218
expect(toJson(instance.render())).toMatchSnapshot();
234219
});
235-
it.only('tow drawer getContainer', () => {
236-
instance = mount(<TowDrawer />);
237-
jest.useFakeTimers();
238-
instance.setProps({
239-
oneOpen: true,
240-
});
241-
jest.runAllTimers();
242-
expect(document.body.style.cssText).toEqual('');
243-
console.log(document.body.style.cssText);
244-
instance.setProps({
245-
towOpen: true,
246-
});
247-
jest.runAllTimers();
248-
console.log(document.body.style.cssText);
249-
expect(document.body.style.cssText).toBe('overflow: hidden;');
250-
instance.setProps({
251-
towOpen: false,
252-
});
253-
jest.runAllTimers();
254-
console.log(document.body.style.cssText);
255-
expect(document.body.style.cssText).toEqual('');
256-
jest.useRealTimers();
257-
});
258220
});

0 commit comments

Comments
 (0)