This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cypress/support/hooks.js | |
// Cypress does not support listening to the fetch method | |
// Therefore, as a workaround we polyfill `fetch` with traditional XHR which | |
// are supported. See: https://github.com/cypress-io/cypress/issues/687 | |
enableFetchWorkaround() | |
// private helpers | |
function enableFetchWorkaround() { | |
let polyfill |