Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created March 16, 2019 10:15
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 jasongorman/3186ddb600f946c3b93b6ead03079243 to your computer and use it in GitHub Desktop.
Save jasongorman/3186ddb600f946c3b93b6ead03079243 to your computer and use it in GitHub Desktop.
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