Parcourir la source

fix(cypress): tests should fail on uncaught exception (#6308)

* also remove broken file logging

ref #6305
bubble
Tim Lai il y a 4 ans
committed by GitHub
Parent
révision
471c24dfcb
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 1 ajouts et 6 suppressions
  1. +1
    -6
      test/e2e-cypress/support/index.js

+ 1
- 6
test/e2e-cypress/support/index.js Voir le fichier

@@ -1,5 +1,3 @@
import fs from "fs"

// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
@@ -29,9 +27,6 @@ Cypress.on("window:before:load", win => {
})

Cypress.on("uncaught:exception", (err, runnable) => {
console.log(err)
console.log(JSON.stringify(err, null, 2))
fs.writeFileSync(require("path").normalize(__dirname, "./error.log"), JSON.stringify(err, null, 2))

throw err
return true
})

Chargement…
Annuler
Enregistrer