Skip to content

Commit

Permalink
Remove impossible test
Browse files Browse the repository at this point in the history
  • Loading branch information
azro352 committed Dec 7, 2022
1 parent 14f3b4d commit bc22667
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions components/grid/__tests__/index.test.tsx
Expand Up @@ -84,22 +84,6 @@ describe('Grid', () => {
expect(asFragment().firstChild).toMatchSnapshot();
});

it('ResponsiveObserve.unsubscribe should be called when unmounted', () => {
let responsiveObserveRef: any;
const Demo = () => {
const responsiveObserve = useResponsiveObserve();
responsiveObserveRef = responsiveObserve;
return null;
};
render(<Demo />);
const Unmount = jest.spyOn(responsiveObserveRef, 'unsubscribe');
const { unmount } = render(<Row gutter={{ xs: 20 }} />);
act(() => {
unmount();
});
expect(Unmount).toHaveBeenCalled();
});

it('should work correct when gutter is object', () => {
const { container } = render(<Row gutter={{ xs: 20 }} />);
expect(container.querySelector('div')!.style.marginLeft).toEqual('-10px');
Expand Down

0 comments on commit bc22667

Please sign in to comment.