housekeeping: address inconsistently truncated JS asset responses within Cypress tests (via #5445)

* add Cypress error trace

* Update package.json

* Update webpack-hot-dev-server.config.js

* Update index.js

* Update index.js
This commit is contained in:
kyle
2019-07-08 00:19:40 -05:00
committed by GitHub
parent 17ba2c6170
commit 21bb452cb7
3 changed files with 12 additions and 3 deletions

View File

@@ -1,3 +1,5 @@
import fs from "fs"
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
@@ -24,4 +26,12 @@ import "./commands"
// see https://github.com/cypress-io/cypress/issues/95
Cypress.on("window:before:load", win => {
win.fetch = null
})
})
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
})