Skip to content

Commit 638b1b9

Browse files
committed
test: add unit test
1 parent 19b06cf commit 638b1b9

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/Cell.spec.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,28 @@ describe('Table.Cell', () => {
122122

123123
expect(wrapper.find('thead th').prop('title')).toEqual('Bamboo');
124124
});
125+
126+
// https://github.com/ant-design/ant-design/issues/51763
127+
it('style merge order', () => {
128+
const wrapper = mount(
129+
<Table
130+
columns={[
131+
{
132+
align: 'center',
133+
onHeaderCell: () => ({
134+
style: {
135+
color: 'red',
136+
textAlign: 'end', // overwrite align
137+
},
138+
}),
139+
},
140+
]}
141+
/>,
142+
);
143+
144+
expect(wrapper.find('thead th').prop('style')).toEqual({
145+
color: 'red',
146+
textAlign: 'end',
147+
});
148+
});
125149
});

0 commit comments

Comments
 (0)