Skip to content

Commit

Permalink
Merge pull request #6 from pratapvardhan/tests
Browse files Browse the repository at this point in the history
TST: Add multiple blank lines, removing same spaces cases
  • Loading branch information
dmnd committed Nov 4, 2015
2 parents 17cca4a + 04eb132 commit c3f3280
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions __tests__/dedent-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,26 @@ describe("dedent", () => {
"That's all.");
});

it("works with multiple blank first lines", () => {
const dd = require("../dedent");
const result = dd`
first
second
third`;
expect(result).toBe("first\nsecond\nthird");
});

it("works with removing same number of spaces", () => {
const dd = require("../dedent");
const result = dd`
first
second
third
`;
expect(result).toBe("first\nsecond\n third");
});

describe("single line input", () => {
const expected = "A single line of input.";

Expand Down

0 comments on commit c3f3280

Please sign in to comment.