ant-design/components/typography/__tests__/prefixCls.test.tsx
叶枫 502dac12aa
docs: format code (#48309)
* docs: fix code

* feat: lint

* feat: prettier

* feat: test

* feat: review

* feat: format html

* feat: format html
2024-04-08 14:04:08 +08:00

21 lines
654 B
TypeScript

import React from 'react';
import { render } from '../../../tests/utils';
import Base from '../Base';
describe('Typography keep prefixCls', () => {
describe('Base', () => {
it('should support className when has prefix', () => {
const { container: wrapper } = render(
<Base component="p" prefixCls="custom-prefixCls" className="custom-class">
test prefixCls
</Base>,
);
expect(
(wrapper.firstChild as HTMLElement)?.className.includes('custom-prefixCls'),
).toBeTruthy();
expect((wrapper.firstChild as HTMLElement)?.className.includes('custom-class')).toBeTruthy();
});
});
});