Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type MockFnReturnType2 = (props: CustomSelectProps) => JSX.Element;
  2. jest.mock(
  3.   "../../../../node_modules/antd/lib/select",
  4.   (): MockFnReturnType2 =>
  5.     function Select(props: CustomSelectProps): JSX.Element {
  6.       function handleChange(): void {
  7.         props.onChange && props.onChange("3443");
  8.       }
  9.       return (
  10.         <select
  11.           data-testid={props.placeholder}
  12.           value={props.value}
  13.           onChange={handleChange}
  14.         >
  15.           <option key="1" value="2">
  16.             3
  17.           </option>
  18.         </select>
  19.       );
  20.     },
  21. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement