Fix linter errors
This commit is contained in:
@@ -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)}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user