Désactive l'echec des tests cypress en cas d'erreur ResizeObserver

pull/2108/head
Johan Girod 2022-04-22 10:36:17 +02:00
parent 3c87d34cab
commit c9d7d221d6
1 changed files with 13 additions and 0 deletions

View File

@ -19,3 +19,16 @@ import './commands'
// Alternatively you can use CommonJS syntax:
// require('./commands')
const resizeObserverLoopErrRe = /^[^(ResizeObserver loop limit exceeded)]/
Cypress.on('uncaught:exception', (err) => {
/*
The error 'ResizeObserver loop limit exceeded' is benigne
Returning false here prevents Cypress from failing the test
cf https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded
*/
if (resizeObserverLoopErrRe.test(err.message)) {
return false
}
})