Skip to content

Commit 801374c

Browse files
committed
Test: strip-spaces
1 parent 20e5755 commit 801374c

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

test/strip-space.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
var Comb = require('../lib/csscomb');
2+
var assert = require('assert');
3+
4+
describe('options/strip-space', function() {
5+
var comb;
6+
beforeEach(function() {
7+
comb = new Comb();
8+
});
9+
it('Invalid value should not change trim trailing brace', function() {
10+
comb.configure({ 'strip-spaces': 'foobar' });
11+
assert.equal(
12+
comb.processString('a { color: red }'),
13+
'a { color: red }'
14+
);
15+
});
16+
it('True Boolean value should trim all trailing spaces', function() {
17+
comb.configure({ 'strip-spaces': true });
18+
assert.equal(
19+
comb.processString(
20+
'a { color: red } \n' +
21+
'b{color:blue}\t \n' +
22+
'i {font:0/0 a}'
23+
),
24+
'a { color: red }\n' +
25+
'b{color:blue}\n' +
26+
'i {font:0/0 a}\n'
27+
);
28+
});
29+
});

0 commit comments

Comments
 (0)