// 100% coverage. One obvious bug. // Teaching excerpts; see the explanation and boundaries on the episode page. // Make the rule explicit const priceAfterDiscount = (total, percent) => total * (1 - percent / 100); expect(priceAfterDiscount(100, 0)).toBe(100); expect(priceAfterDiscount(100, 20)).toBe(80);