Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

38 строки
1.1 KiB

  1. import fs from "fs"
  2. // ***********************************************************
  3. // This example support/index.js is processed and
  4. // loaded automatically before your test files.
  5. //
  6. // This is a great place to put global configuration and
  7. // behavior that modifies Cypress.
  8. //
  9. // You can change the location of this file or turn off
  10. // automatically serving support files with the
  11. // 'supportFile' configuration option.
  12. //
  13. // You can read more here:
  14. // https://on.cypress.io/configuration
  15. // ***********************************************************
  16. // Import commands.js using ES2015 syntax:
  17. import "./commands"
  18. // Alternatively you can use CommonJS syntax:
  19. // require('./commands')
  20. // Remove fetch, so Cypress can intercept XHRs
  21. // see https://github.com/cypress-io/cypress/issues/95
  22. Cypress.on("window:before:load", win => {
  23. win.fetch = null
  24. })
  25. Cypress.on("uncaught:exception", (err, runnable) => {
  26. console.log(err)
  27. console.log(JSON.stringify(err, null, 2))
  28. fs.writeFileSync(require("path").normalize(__dirname, "./error.log"), JSON.stringify(err, null, 2))
  29. throw err
  30. })