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

docs(selectFile): readFile & fixture should use null instead of { encoding: null } #5563

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/api/actions/selectfile.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Either a single file, or an array of files. A file can be:
[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)
containing binary data, such as `Uint8Array.from('123')`.
[`Cypress.Buffer`](/api/utilities/buffer) instances, such as those returned by
`cy.readFile('file.json', { encoding: null })` or created by
`cy.readFile('file.json', null)` or created by
`Cypress.Buffer.from('foo')` are `TypedArray` instances.
- An object with a non-null `contents` property, specifying details about the
file. Eg: `{contents: '@alias', fileName: 'file.json'}`
Expand Down Expand Up @@ -144,7 +144,7 @@ though a user would not be able to directly activate the file input.
### From a fixture

```javascript
cy.fixture('file.json', { encoding: null }).as('myFixture')
cy.fixture('file.json', null).as('myFixture')
cy.get('input[type=file]').selectFile('@myFixture')
```

Expand Down