Page 1 of 2

Gamework Quiz

Consider the following React Component for an e-commerce app:
This component works correctly, but testing it is difficult — we'd have to spin up multiple user journey tests to cover the behavior exposed by different logical branches.

How would you make testing of this behavior easy?

A
B
C
D