Cypress · Senior · Question 20 of 76

What makes a good custom command in a large Cypress codebase?

Show the answer

Correct answer: Small, well-named, typed and doing one thing

Explanation

Large commands with many options become hard to reason about. Prefer composition of small commands and plain helper functions.

Further reading

Problem with a question

Cypress · Senior · question 20

Test yourself

Take the Cypress · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz