signoz/frontend/cypress/CustomFunctions/uncaughtExpection.ts
2022-02-16 15:36:20 +05:30

15 lines
347 B
TypeScript

const resizeObserverLoopErrRe = /ResizeObserver loop limit exceeded/;
const unCaughtExpection = () => {
cy.on('uncaught:exception', (err) => {
if (resizeObserverLoopErrRe.test(err.message)) {
// returning false here prevents Cypress from
// failing the test
return false;
}
return true;
});
};
export default unCaughtExpection;