You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got the following errors when trying to build frontend with "npm run build" under frontend/apps/remark42:
ERROR in ./app/components/comment-form/__subscribe-by-email/comment-form__subscribe-by-email.test.tsx:201:15
TS2722: Cannot invoke an object which is possibly 'undefined'.
199 | expect(typeof onInputEmail === 'function').toBe(true);
200 |
> 201 | act(() => onInputEmail(makeInputEvent('[email protected]')));
| ^^^^^^^^^^^^
202 |
203 | form.simulate('submit');
204 |
ERROR in ./app/components/comment-form/__subscribe-by-email/comment-form__subscribe-by-email.test.tsx:201:15
TS2684: The 'this' context of type 'void' is not assignable to method's 'this' of type 'never'.
199 | expect(typeof onInputEmail === 'function').toBe(true);
200 |
> 201 | act(() => onInputEmail(makeInputEvent('[email protected]')));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
202 |
203 | form.simulate('submit');
204 |
ERROR in ./app/components/comment-form/__subscribe-by-email/comment-form__subscribe-by-email.test.tsx:227:15
TS2722: Cannot invoke an object which is possibly 'undefined'.
225 | expect(typeof onClick === 'function').toBe(true);
226 |
> 227 | act(() => onClick());
| ^^^^^^^
228 |
229 | expect(unsubscribeFromEmailUpdatesMock).toHaveBeenCalled();
230 |
ERROR in ./app/components/comment-form/__subscribe-by-email/comment-form__subscribe-by-email.test.tsx:227:15
TS2554: Expected 1 arguments, but got 0.
225 | expect(typeof onClick === 'function').toBe(true);
226 |
> 227 | act(() => onClick());
| ^^^^^^^^^
228 |
229 | expect(unsubscribeFromEmailUpdatesMock).toHaveBeenCalled();
230 |
I don't think I know TypeScript enough to confidently contribute a fix, but the following patch seems to fix the build issue and allowed tests to pass:
I got the following errors when trying to build frontend with "npm run build" under
frontend/apps/remark42
:I don't think I know TypeScript enough to confidently contribute a fix, but the following patch seems to fix the build issue and allowed tests to pass:
The text was updated successfully, but these errors were encountered: