Bird
0
0

Which file types can cy.readFile() read by default without extra parsing?

easy📝 Conceptual Q2 of 15
Cypress - File Operations
Which file types can cy.readFile() read by default without extra parsing?
AOnly JSON files
BOnly binary files
CText and JSON files
DOnly image files
Step-by-Step Solution
Solution:
  1. Step 1: Identify default readable file types

    cy.readFile() can read plain text and JSON files directly.
  2. Step 2: Exclude unsupported types

    Binary and image files require special handling, not default reading.
  3. Final Answer:

    Text and JSON files -> Option C
  4. Quick Check:

    Default readable files = Text and JSON [OK]
Quick Trick: Text and JSON files read easily by cy.readFile() [OK]
Common Mistakes:
  • Assuming only JSON files are readable
  • Thinking binary files are read by default
  • Confusing image files as readable text

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Cypress Quizzes