Shopify Interview Question

How would you test this? (In reference to the solution you put together in the pair programming session)