From 4428f790467a93ec719de509272e437287bf2664 Mon Sep 17 00:00:00 2001 From: Xin Li Date: Tue, 4 Jun 2024 00:00:03 -0700 Subject: [PATCH] SubscribeByEmailForm: Ensure onInput and onClick props are typed correctly. Resolves #1771 --- .../comment-form__subscribe-by-email.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/apps/remark42/app/components/comment-form/__subscribe-by-email/comment-form__subscribe-by-email.test.tsx b/frontend/apps/remark42/app/components/comment-form/__subscribe-by-email/comment-form__subscribe-by-email.test.tsx index 8aa999ea..77e16fb1 100644 --- a/frontend/apps/remark42/app/components/comment-form/__subscribe-by-email/comment-form__subscribe-by-email.test.tsx +++ b/frontend/apps/remark42/app/components/comment-form/__subscribe-by-email/comment-form__subscribe-by-email.test.tsx @@ -193,7 +193,7 @@ describe('', () => { it('should send form by paste valid token', async () => { const wrapper = createWrapper(); - const onInputEmail = wrapper.find(Input).prop('onInput'); + const onInputEmail = wrapper.find(Input).prop('onInput') as Function; const form = wrapper.find('form'); expect(typeof onInputEmail === 'function').toBe(true); @@ -220,7 +220,7 @@ describe('', () => { it('should pass throw unsubscribe process', async () => { const store = mockStore({ ...initialStore, user: { email_subscription: true } }); const wrapper = createWrapper(store); - const onClick = wrapper.find(Button).prop('onClick'); + const onClick = wrapper.find(Button).prop('onClick') as Function; expect(typeof onClick === 'function').toBe(true);