Skip to content

Instantly share code, notes, and snippets.

View jcampuza's full-sized avatar
🎯
This is new

Joseph Campuzano jcampuza

🎯
This is new
View GitHub Profile
@sliptype
sliptype / Test.tsx
Created June 14, 2019 16:12
Testing React components using Redux Hooks with Jest
import { render, cleanup } from '@testing-library/react';
import { useSelector } from 'react-redux';
import { when } from 'jest-when';
import { getValue } from 'selectors';
jest.mock('react-redux');
afterEach(cleanup);