mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 17:31:25 +08:00
7322aa6f5f
This reverts commit 6759887c44
.
31 lines
766 B
TypeScript
31 lines
766 B
TypeScript
import React from 'react';
|
|
import Space from '..';
|
|
import { render } from '../../../tests/utils';
|
|
|
|
jest.mock('../../_util/styleChecker', () => ({
|
|
canUseDocElement: () => true,
|
|
isStyleSupport: () => true,
|
|
detectFlexGapSupported: () => true,
|
|
}));
|
|
|
|
describe('flex gap', () => {
|
|
it('should render width empty children', () => {
|
|
const { container } = render(
|
|
<Space>
|
|
<span />
|
|
<span />
|
|
</Space>,
|
|
);
|
|
expect(
|
|
container.querySelector<HTMLDivElement>('div.ant-space')?.style[
|
|
'column-gap' as keyof CSSStyleDeclaration
|
|
],
|
|
).toBe('8px');
|
|
expect(
|
|
container.querySelector<HTMLDivElement>('div.ant-space')?.style[
|
|
'row-gap' as keyof CSSStyleDeclaration
|
|
],
|
|
).toBe('8px');
|
|
});
|
|
});
|