[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user