Fix linter errors

This commit is contained in:
Pavel Mineev
2020-04-08 11:47:00 -05:00
committed by Umputun
parent ddafb40b2d
commit 01befe0c29
4 changed files with 6 additions and 6 deletions
@@ -26,7 +26,7 @@ function simulateInput(input: ReactWrapper, value: string) {
describe('EmailLoginForm', () => {
const testUser = ({} as any) as User;
const onSuccess = jest.fn(async () => {});
const onSuccess = jest.fn(async () => undefined);
const onSignIn = jest.fn(async () => testUser);
beforeEach(() => {
@@ -88,7 +88,7 @@ export const TextExpander: FunctionalComponent = ({ children }) => {
expander.removeEventListener('text-expander-value', textExpanderValueListener);
};
}
return () => {};
return () => undefined;
}, [theme]);
if (StaticStore.config.emoji_enabled) {
return <text-expander ref={expanderRef}>{children}</text-expander>;
@@ -146,7 +146,7 @@ describe('<Comment />', () => {
});
it('disabled for already upvoted comment', async () => {
const voteSpy = jest.fn(async () => {});
const voteSpy = jest.fn(async () => undefined);
const element = mount(
<Comment
{...(DefaultProps as Props)}
@@ -180,7 +180,7 @@ describe('<Comment />', () => {
}, 30000);
it('disabled for already downvoted comment', async () => {
const voteSpy = jest.fn(async () => {});
const voteSpy = jest.fn(async () => undefined);
const element = mount(
<Comment
{...(DefaultProps as Props)}
+2 -2
View File
@@ -70,12 +70,12 @@ describe('user', () => {
);
const dispatch = jest.fn();
const getState = jest.fn();
await logIn({ name: 'google' })(dispatch, getState, undefined).catch(() => {});
await logIn({ name: 'google' })(dispatch, getState, undefined).catch(() => undefined);
expect(dispatch).not.toBeCalled();
});
it('should unset user on logOut', async () => {
(api.logOut as any).mockImplementation(async (): Promise<void> => {});
(api.logOut as any).mockImplementation(async (): Promise<void> => undefined);
const dispatch = jest.fn();
const getState = jest.fn();
await logout()(dispatch, getState, undefined);