[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.
This commit is contained in:
Xavier Morel
2021-06-29 05:34:16 +00:00
parent c6855cdcf8
commit 9528fd350f
+7
View File
@@ -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