Skip to content

Adding documentation on .js fixture files#4324

Open
reinhrst wants to merge 1 commit intocypress-io:mainfrom
reinhrst:patch-1
Open

Adding documentation on .js fixture files#4324
reinhrst wants to merge 1 commit intocypress-io:mainfrom
reinhrst:patch-1

Conversation

@reinhrst
Copy link
Copy Markdown

(Taking a stab at) adding documentation on .js fixture files. Current documentation mentions that .js fixture files are possible, but doesn't describe how to use them, leading to issues like cypress-io/cypress#1271 .

I do think the current .js fixture support should get a good rethink (as mentioned 4 years ago in that issue) , but in the meantime it should have some documentation on how to use it (or fully remove any mention of it from the documentation, making it "unsupported").

(Taking a stab at) adding documentation on `.js` fixture files. Current documentation mentions that `.js` fixture files are possible, but doesn't describe how to use them, leading to issues like cypress-io/cypress#1271 .

I do think the current `.js` fixture support should get a good rethink (as mentioned 4 years ago in that issue) , but in the meantime it should have some documentation on how to use it (or fully remove any mention of it from the documentation, making it "unsupported").
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 26, 2022

👷 Deploy request for cypress-docs pending review.
Visit the deploys page to approve it

🔨 Explore the source changes: 7618a71

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 26, 2022

@reinhrst is attempting to deploy a commit to the Cypress Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jan 26, 2022

CLA assistant check
All committers have signed the CLA.

```
#### JavaScript file
Cypress allows a `.js` file as a fixture, in places where JSON is expected.
The contents of this file are treated as a something that evaluates to a JavaScript object (within Cypress, the content of the file is `eval()`-ed, with parentheses:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor grammar fix: remove the article "a" from "treated as a something" -> "treated as something"

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants