You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We added a .then method to the return value of Cypress.Blob.base64StringToBlob so we could improve the error message when a user attempts to use its old promise-returning API (see this comment). This causes methods like Promise.resolve and Promise.try to think the return value is a thenable, invoking the .then and throwing our error. This makes it difficult to add backwards compatibility without an ugly hack.
Desired behavior:
We shouldn't add on the .then method so that the return value is not mistaken for a promise-returning value. This may just result in a .then is not a function error when using the old API, but that might not be so bad.
The code for this is done in cypress-io/cypress#8366, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
Current behavior:
We added a
.then
method to the return value ofCypress.Blob.base64StringToBlob
so we could improve the error message when a user attempts to use its old promise-returning API (see this comment). This causes methods likePromise.resolve
andPromise.try
to think the return value is athenable
, invoking the.then
and throwing our error. This makes it difficult to add backwards compatibility without an ugly hack.Desired behavior:
We shouldn't add on the
.then
method so that the return value is not mistaken for a promise-returning value. This may just result in a.then is not a function
error when using the old API, but that might not be so bad.Test code to reproduce
Versions
Cypress 5.0.0
The text was updated successfully, but these errors were encountered: