mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
test(components): [card] add optional chaining (#8058)
This commit is contained in:
@@ -55,7 +55,7 @@ describe('Card.vue', () => {
|
||||
const style = [{ 'font-size': '14px' }, { color: 'blue' }]
|
||||
const wrapper = mount(() => <Card bodyStyle={style}>{AXIOM}</Card>)
|
||||
expect(
|
||||
wrapper.find('.el-card__body').attributes('style').replace(/[ ]/g, '')
|
||||
wrapper.find('.el-card__body').attributes('style')?.replace(/[ ]/g, '')
|
||||
).toBe('font-size:14px;color:blue;')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user