import * as React from 'react';
import Divider from '..';
import mountTest from '../../../tests/shared/mountTest';
import { render } from '../../../tests/utils';
describe('Divider', () => {
mountTest(Divider);
it('not show children when vertical', () => {
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
const { container } = render(Bamboo);
expect(container.querySelector('.ant-divider-inner-text')).toBeFalsy();
errSpy.mockRestore();
});
it('support string orientationMargin', () => {
const { container } = render(
test test test
,
);
expect(container?.querySelector('.ant-divider-inner-text')).toHaveStyle({
marginRight: 10,
});
});
it('support bool dashed', () => {
const { container } = render(
test test test
,
);
expect(container?.querySelector('.ant-divider-dashed')).toHaveStyle({
borderStyle: 'dashed',
});
});
});