Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. const quote = require("../../src/tell_dont_ask/carpet_quote");
  2.  
  3.  
  4. test("quote for carpet without rounding up", () => {
  5. const room = {length: 2.5, width: 2.5};
  6. const carpet = {pricePerSqrMetre: 10.0, roundUp: false};
  7. expect(quote(room, carpet)).toBe(62.5);
  8. })
  9.  
  10. test("quote for carpet with rounding up", () => {
  11. const room = {length: 2.5, width: 2.5};
  12. const carpet = {pricePerSqrMetre: 10.0, roundUp: true};
  13. expect(quote(room, carpet)).toBe(70.0);
  14. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement