Handle React's contenteditable warning in Jest

In complement to , here is a quick note regarding the warning thrown by React when using contenteditable on children elements of a component.

Although it does not seem to be going anywhere, you can silence it in a somewhat hacky way in Jest by doing the following :

console.warn = jest.genMockFunction();
someCallTriggeringTheWarningANumberOfTimes();
expect(console.warn.mock.calls.length).toBeGreaterThan(0);

Here is the issue I opened on GitHub on the subject, where I have been told some work would be put into making this particular warning less of a pain in the testsuite. Go on and leave a comment there if it annoys you as well !