Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsibinski/bc7fadda8108de46dab2edaf30e87ed2 to your computer and use it in GitHub Desktop.
Save dsibinski/bc7fadda8108de46dab2edaf30e87ed2 to your computer and use it in GitHub Desktop.
it('getDiscountPercentageValue returns 10 percent discount for total quantity of 50', () => {
let discountApplier = new DiscountApplier();
let products = [new Product("Product 1", 1, 25), new Product("Product 2", 1, 25)];
let discountValue = discountApplier.getDiscountPercentageValue(products);
expect(discountValue).toBe(10);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment