Skip to content

Commit f5500a5

Browse files
committed
Add test for csscomb/csscomb#216
1 parent e792f82 commit f5500a5

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

test/sort-order.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,33 @@ describe('options/sort-order', function() {
143143
assert.equal(comb.processString(input), expected);
144144

145145
});
146+
147+
it('Should not add more than 1 line between groups', function() {
148+
149+
var config = {
150+
'sort-order': [
151+
['top'], ['color']
152+
]
153+
};
154+
155+
var input = 'a\n' +
156+
'{\n' +
157+
'\tcolor: tomato;\n' +
158+
'\ttop: 0;\n' +
159+
'}';
160+
161+
var expected = 'a\n' +
162+
'{\n' +
163+
'\ttop: 0;\n' +
164+
'\n' +
165+
'\tcolor: tomato;\n' +
166+
'}';
167+
168+
comb.configure(config);
169+
for (var i = 6; i--;) {
170+
input = comb.processString(input);
171+
}
172+
assert.equal(input, expected);
173+
174+
});
146175
});

0 commit comments

Comments
 (0)