Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const quote = require("../../src/tell_dont_ask/carpet_quote");
const room = require("../../src/tell_dont_ask/room");
const carpet = require("../../src/tell_dont_ask/carpet");
test("quote for carpet without rounding up", () => {
expect(quote(
room(2.5, 2.5),
carpet(10.0, false))
).toBe(62.5);
})
test("quote for carpet with rounding up", () => {
expect(quote(
room(2.5, 2.5),
carpet(10.0, true))
).toBe(70.0);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment