浏览代码

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

* also remove broken file logging

ref #6305
bubble
Tim Lai 4 年前
committed by GitHub
父节点
当前提交
471c24dfcb
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. +1
    -6
      test/e2e-cypress/support/index.js

+ 1
- 6
test/e2e-cypress/support/index.js 查看文件

@@ -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
})

正在加载...
取消
保存