You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
766 B
31 lines
766 B
4 years ago
|
import React from 'react';
|
||
|
import Space from '..';
|
||
2 years ago
|
import { render } from '../../../tests/utils';
|
||
4 years ago
|
|
||
|
jest.mock('../../_util/styleChecker', () => ({
|
||
|
canUseDocElement: () => true,
|
||
|
isStyleSupport: () => true,
|
||
|
detectFlexGapSupported: () => true,
|
||
|
}));
|
||
|
|
||
|
describe('flex gap', () => {
|
||
|
it('should render width empty children', () => {
|
||
3 years ago
|
const { container } = render(
|
||
4 years ago
|
<Space>
|
||
|
<span />
|
||
|
<span />
|
||
|
</Space>,
|
||
|
);
|
||
2 years ago
|
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');
|
||
4 years ago
|
});
|
||
|
});
|