Cannot use cy.readFile or cy.task inside cy.intercept even if promises are supported #15270
Labels
topic: cy.intercept()
type: duplicate
This issue or pull request already exists
type: unexpected behavior
User expected result, but got another
Current behavior
Using both
cy.readFile
orcy.task
insidecy.intercept
will occur the following error:Desired behavior
We generate fixtures files before running Cypress containing multiple possible responses for each query. We would like to read the generated files in order to match the good mock according to the query's variables but we are unable to use
cy.readFile
orcy.task
(that would usefs
) insidecy.intercept
.Test code to reproduce
Versions
Mac OS 11.2.1
Cypress 6.5.0
Node 14.15.3
The text was updated successfully, but these errors were encountered: