Cypress · Senior · Question 31 of 76

How should feature flags be handled in Cypress tests?

Show the answer

Correct answer: Set flags per test, e.g. via API or intercepted config

Explanation

Controlling the flag makes both paths testable and stops tests failing when someone toggles a shared flag.

Further reading

Problem with a question

Cypress · Senior · question 31

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