Last active
August 9, 2020 23:32
-
-
Save gugiserman/06412c0f3500e87adeebb1a236d6b410 to your computer and use it in GitHub Desktop.
Bypass recharts ResponsiveContainer width and height warnings in jest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jest.setup.js | |
const MockResponsiveContainer = props => <div {...props} /> | |
jest.mock('recharts', () => ({ | |
...jest.requireActual('recharts'), | |
ResponsiveContainer: MockResponsiveContainer, | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment