23π
β
I always feel pretty silly when I spend a day researching my question prior to asking it, then I figure it out on my own 15 minutes laterβ¦
Rather than deleting this Iβm going to post the answer for anyone else that may have a similar issue. I realized that Iβm using a wrapper for chart.js, react-chartjs-2
so I searched on their github and sure enough someone had already posted the exact answer to my question. https://github.com/jerairrest/react-chartjs-2/issues/155
Adding the following mock to my setup-jest.js
file resolved the console errors I was getting.
jest.mock('react-chartjs-2', () => ({
Bar: () => null
}));
Source:stackexchange.com