Created
March 16, 2019 10:02
-
-
Save jasongorman/5441ca6ae4139b96da555d242088730c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const quote = require("../../src/tell_dont_ask/carpet_quote"); | |
test("quote for carpet without rounding up", () => { | |
const room = {length: 2.5, width: 2.5}; | |
const carpet = {pricePerSqrMetre: 10.0, roundUp: false}; | |
expect(quote(room, carpet)).toBe(62.5); | |
}) | |
test("quote for carpet with rounding up", () => { | |
const room = {length: 2.5, width: 2.5}; | |
const carpet = {pricePerSqrMetre: 10.0, roundUp: true}; | |
expect(quote(room, carpet)).toBe(70.0); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment