mirror of
https://github.com/NLnetLabs/krill.git
synced 2026-09-20 08:27:49 +02:00
Ignore all unhandled promise rejections
Newer Cypress fails tests in more situations than Cypress 6.8.0, but we’re not ready to investigate the root cause yet so just retain the previous behaviour for now.
This commit is contained in:
@@ -29,10 +29,15 @@
|
||||
|
||||
// Define a custom uncaught exception handling policy for Cypress.
|
||||
// Returning false prevents Cypress from failing the test.
|
||||
Cypress.on('uncaught:exception', (err, runnable) => {
|
||||
Cypress.on('uncaught:exception', (err, runnable, promise) => {
|
||||
console.log("Krill UI Test: Examining uncaught exception..")
|
||||
console.log("Krill UI Test: err: ", err)
|
||||
|
||||
if (promise) {
|
||||
console.log("Krill UI Test: Ignoring unhandled promise rejection.")
|
||||
return false
|
||||
}
|
||||
|
||||
if (err.message) {
|
||||
if (err.message.includes('ResizeObserver loop limit exceeded')) {
|
||||
console.log("Krill UI Test: Ignoring 'ResizeObserver loop limit exceeded' exception")
|
||||
|
||||
Reference in New Issue
Block a user