Testing · Senior · Question 66 of 75
How do you test a feature behind a feature flag?
- ✓Correct answer: Inject the flag value in tests and cover both variants at the level where they diverge; E2E only for the critical variant
- 2Test only the enabled variant
- 3Remove flags in test builds
Explanation
Combinations of flags grow exponentially - test variants independently and clean up old flags.