@@ -9,60 +9,72 @@ describe('options/colon-space', function() {
99 it ( 'Invalid String should not change space around colon' , function ( ) {
1010 comb . configure ( { 'colon-space' : 'foobar' } ) ;
1111 assert . equal (
12- comb . processString ( 'a { color: red }' ) ,
13- 'a { color: red }'
12+ comb . processString ( 'a { color : red }' ) ,
13+ 'a { color : red }'
1414 ) ;
1515 } ) ;
1616 it ( 'True Boolean value should set space after colon' , function ( ) {
1717 comb . configure ( { 'colon-space' : true } ) ;
1818 assert . equal (
1919 comb . processString (
20- 'a { color: red }\n' +
21- 'b{color:blue}\n' +
22- 'i {font : 0/0 a}'
20+ 'a { color: red }' +
21+ 'a{color:red}' +
22+ 'a {color : red}' +
23+ 'a {color : /* foo */ red }' +
24+ 'a {color /* bar */ : red }'
2325 ) ,
24- 'a { color: red }\n' +
25- 'b{color: blue}\n' +
26- 'i {font: 0/0 a}'
26+ 'a { color: red }' +
27+ 'a{color: red}' +
28+ 'a {color: red}' +
29+ 'a {color: /* foo */ red }' +
30+ 'a {color /* bar */: red }'
2731 ) ;
2832 } ) ;
29- it ( '`before ` value should set space before colon' , function ( ) {
30- comb . configure ( { 'colon-space' : 'before ' } ) ;
33+ it ( '`after ` value should set space after colon' , function ( ) {
34+ comb . configure ( { 'colon-space' : 'after ' } ) ;
3135 assert . equal (
3236 comb . processString (
33- 'a { color: red }\n' +
34- 'b{color:blue}\n' +
35- 'i {font : 0/0 a}'
37+ 'a { color: red }' +
38+ 'a{color:red}' +
39+ 'a {color : red}' +
40+ 'a {color : /* foo */ red }' +
41+ 'a {color /* bar */ : red }'
3642 ) ,
37- 'a { color :red }\n' +
38- 'b{color :blue}\n' +
39- 'i {font :0/0 a}'
43+ 'a { color: red }' +
44+ 'a{color: red}' +
45+ 'a {color: red}' +
46+ 'a {color: /* foo */ red }' +
47+ 'a {color /* bar */: red }'
4048 ) ;
4149 } ) ;
42- it ( '`after ` value should set space before colon' , function ( ) {
43- comb . configure ( { 'colon-space' : 'after ' } ) ;
50+ it ( '`before ` value should set space before colon' , function ( ) {
51+ comb . configure ( { 'colon-space' : 'before ' } ) ;
4452 assert . equal (
4553 comb . processString (
46- 'a { color: red }\n' +
47- 'b{color:blue}\n' +
48- 'i {font : 0/0 a}'
54+ 'a { color: red }' +
55+ 'a{color:red}' +
56+ 'a {color : red}' +
57+ 'a {color : /* foo */ red }' +
58+ 'a {color /* bar */ : red }'
4959 ) ,
50- 'a { color: red }\n' +
51- 'b{color: blue}\n' +
52- 'i {font: 0/0 a}'
60+ 'a { color :red }' +
61+ 'a{color :red}' +
62+ 'a {color :red}' +
63+ 'a {color :/* foo */ red }' +
64+ 'a {color /* bar */ :red }'
5365 ) ;
5466 } ) ;
5567 it ( '`both` value should set spaces around colon' , function ( ) {
5668 comb . configure ( { 'colon-space' : 'both' } ) ;
5769 assert . equal (
5870 comb . processString (
59- 'a { color: red }\n ' +
60- 'b {color:blue}\n ' +
61- 'i {font : 0/0 a }'
71+ 'a { color: red }' +
72+ 'a {color:red} ' +
73+ 'a {color : red }'
6274 ) ,
63- 'a { color : red }\n ' +
64- 'b {color : blue}\n ' +
65- 'i {font : 0/0 a }'
75+ 'a { color : red }' +
76+ 'a {color : red} ' +
77+ 'a {color : red }'
6678 ) ;
6779 } ) ;
6880} ) ;
0 commit comments