signoz/frontend/cypress/CustomFunctions/uncaughtExpection.ts
2022-03-14 20:12:42 +05:30

12 lines
317 B
TypeScript

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