From 9528fd350f43a0dd4c9cbed8f956a273a173bb3d Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 21 Jun 2021 12:42:56 +0000 Subject: [PATCH] [FIX] qunit: suppress ResizeObserver error The error is (apparently) benign and already suppressed in some parts of the system, however it can (apparently) trigger locally during some tests, causing the test to fail as the error is caught and converted to a failure by QUnit. Sadly QUnit does not offer a proper hook for this, so it has to be suppressed by wrapping the existing handler and only calling it for other errors. --- addons/web/static/tests/qunit.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/web/static/tests/qunit.js b/addons/web/static/tests/qunit.js index d66bce60f8a..6203facd223 100644 --- a/addons/web/static/tests/qunit.js +++ b/addons/web/static/tests/qunit.js @@ -363,6 +363,13 @@ }); } }); + const oldError = QUnit.onError; + QUnit.onError = err => { + if (err.message === 'ResizeObserver loop limit exceeded') { + return true; + } + return oldError(err); + } // ----------------------------------------------------------------------------- // Add sort button