Skip to content

Commit 9d81c6c

Browse files
committed
Test to check splitting 2 comment blocks
1 parent 2dab161 commit 9d81c6c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/kss-splitter.js

+21
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@ var gulp = require('gulp'),
77

88
describe('KSS splitter', function() {
99

10+
it('Split 2 blocks of comments', function(){
11+
var str = multiline(function() {
12+
/*
13+
// Comment1
14+
// Comment1
15+
16+
// Comment2
17+
// Comment2
18+
*/
19+
}),
20+
result = [
21+
{ type: 'comment', content: '// Comment1\n// Comment1' },
22+
{ type: 'code', content: '' },
23+
{ type: 'comment', content: '// Comment2\n// Comment2' }
24+
],
25+
split = kssSplitter.pureSplitter(str);
26+
27+
expect(split).eql(result);
28+
29+
});
30+
1031
it('should parse single KSS block', function() {
1132
var str = multiline(function() {
1233
/*

0 commit comments

Comments
 (0)