signoz/frontend/cypress/CustomFunctions/uncaughtExpection.ts

12 lines
317 B
TypeScript
Raw Normal View History

2022-02-16 15:36:20 +05:30
const resizeObserverLoopErrRe = /ResizeObserver loop limit exceeded/;
2022-03-14 20:12:42 +05:30
const unCaughtExpection = (): void => {
2022-02-16 15:36:20 +05:30
cy.on('uncaught:exception', (err) => {
2022-03-14 20:12:42 +05:30
// returning false here prevents Cypress from
// failing the test
return !resizeObserverLoopErrRe.test(err.message);
2022-02-16 15:36:20 +05:30
});
};
export default unCaughtExpection;