Skip to content

Commit ee1af4e

Browse files
committed
Merge pull request #272 from mahonnaise/text-indent
improved text-indent's test coverage
2 parents 554f126 + 6c47b49 commit ee1af4e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tests/rules/text-indent.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@
1414
Assert.areEqual("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.", result.messages[0].message);
1515
},
1616

17-
"-98px text-indent should not result in a warning": function(){
18-
var result = CSSLint.verify(".foo{text-indent: -98px;} ", {"text-indent": 1 });
17+
"-99px text-indent should not result in a warning": function(){
18+
var result = CSSLint.verify(".foo{text-indent: -99px;} ", {"text-indent": 1 });
19+
Assert.areEqual(0, result.messages.length);
20+
},
21+
22+
"-99em text-indent should not result in a warning": function(){
23+
var result = CSSLint.verify(".foo{text-indent: -99em;} ", {"text-indent": 1 });
1924
Assert.areEqual(0, result.messages.length);
2025
},
2126

@@ -26,8 +31,8 @@
2631
Assert.areEqual(0, result.messages.length);
2732
},
2833

29-
"-100px text-indent with RTL should result in a warning": function(){
30-
var result = CSSLint.verify(".foo{text-indent: -100px; direction: rtl; }", {"text-indent": 1 });
34+
"-100em text-indent with RTL should result in a warning": function(){
35+
var result = CSSLint.verify(".foo{text-indent: -100em; direction: rtl; }", {"text-indent": 1 });
3136
Assert.areEqual(1, result.messages.length);
3237
Assert.areEqual("warning", result.messages[0].type);
3338
Assert.areEqual("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.", result.messages[0].message);

0 commit comments

Comments
 (0)