Skip to content

Commit f1e7037

Browse files
committed
Add tests for blank lines containing whitespace
1 parent 03f71bd commit f1e7037

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

fluent-dedent/test/blank_test.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,31 @@ suite("blank lines", function() {
3434
"foo\n"
3535
);
3636
});
37+
38+
test("containing the same amount of spaces as the common indent", function() {
39+
assert.equal(
40+
ftl`
41+
42+
`,
43+
""
44+
);
45+
});
46+
47+
test("containing too few spaces", function() {
48+
assert.throws(
49+
() => ftl`
50+
51+
`,
52+
/Insufficient indentation in line 0/
53+
);
54+
});
55+
56+
test("containing too many spaces", function() {
57+
assert.equal(
58+
ftl`
59+
60+
`,
61+
" "
62+
);
63+
});
3764
});

0 commit comments

Comments
 (0)