SubscribeByEmailForm: Ensure onInput and onClick props are typed correctly.

Resolves #1771
This commit is contained in:
Xin Li
2024-06-04 11:06:14 -05:00
committed by Umputun
parent bad6af87f7
commit 4428f79046
@@ -193,7 +193,7 @@ describe('<SubscribeByEmailForm/>', () => {
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('<SubscribeByEmailForm/>', () => {
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);