Browse Source
* fix: Pass custom prefixCls to Typography from Base (#38580) * test: Added test for typography custom prefixClspull/38605/head
Matthew
2 years ago
committed by
GitHub
2 changed files with 22 additions and 1 deletions
@ -0,0 +1,20 @@ |
|||
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(); |
|||
}); |
|||
}); |
|||
}); |
Loading…
Reference in new issue