Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cy.writeFile type does not have 4 argument version #15353

Closed
bahmutov opened this issue Mar 6, 2021 · 5 comments · Fixed by #15602
Closed

cy.writeFile type does not have 4 argument version #15353

bahmutov opened this issue Mar 6, 2021 · 5 comments · Fixed by #15602

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Mar 6, 2021

Cypress v6.6.0
cy.writeFile type signature does not allow 4 options, which works at runtime

Screen Shot 2021-03-06 at 9 04 26 AM

@jennifer-shehane
Copy link
Member

@jennifer-shehane
Copy link
Member

What happens if you pass different encoding in encoding arg than in options arg. I think this may be why this wasn't documented.

@sainthkh
Copy link
Contributor

@jennifer-shehane According to the lodash doc and the cy.writeFile code below,

options = _.defaults({}, userOptions, {
encoding: encoding ? encoding : 'utf8',
flag: userOptions.flag ? userOptions.flag : 'w',
log: true,
})

encoding in options takes precedence.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 22, 2021

The code for this is done in cypress-io/cypress#15602, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 5, 2021

Released in 7.0.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v7.0.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants