From 12c2d224b82a7507f813bc864d8d60a199f4749a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Tue, 14 Nov 2023 10:18:39 +0800 Subject: [PATCH] test: add test case --- tests/Virtual.spec.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/Virtual.spec.tsx b/tests/Virtual.spec.tsx index f2ad1398b..10742ffb5 100644 --- a/tests/Virtual.spec.tsx +++ b/tests/Virtual.spec.tsx @@ -396,4 +396,20 @@ describe('Table.Virtual', () => { }); }); }); + + it('components', async () => { + const { container } = getTable({ + components: { + header: { + cell: function MyTh(props: any) { + return ; + }, + }, + }, + }); + + await waitFakeTimer(); + + expect(container.querySelector('thead th')).toHaveAttribute('data-mark', 'my-th'); + }); });