From a0f19a4f2d09ffe671a2771d287b35fb0c40ce89 Mon Sep 17 00:00:00 2001 From: sand4rt Date: Thu, 25 Aug 2022 22:02:55 +0200 Subject: [PATCH] test(ct): solid callbacks (#16837) --- tests/components/ct-solid/src/components/Button.tsx | 3 ++- tests/components/ct-solid/src/tests.spec.tsx | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/components/ct-solid/src/components/Button.tsx b/tests/components/ct-solid/src/components/Button.tsx index 564a455861..78b0a7791f 100644 --- a/tests/components/ct-solid/src/components/Button.tsx +++ b/tests/components/ct-solid/src/components/Button.tsx @@ -1,6 +1,7 @@ type ButtonProps = { title: string; + onClick?(props: string): void; } export default function Button(props: ButtonProps) { - return + return } diff --git a/tests/components/ct-solid/src/tests.spec.tsx b/tests/components/ct-solid/src/tests.spec.tsx index a8b6cbefee..f8a2769799 100644 --- a/tests/components/ct-solid/src/tests.spec.tsx +++ b/tests/components/ct-solid/src/tests.spec.tsx @@ -7,3 +7,12 @@ test('props should work', async ({ mount }) => { const component = await mount() + await component.click() + expect(messages).toEqual(['hello']) +})