Skip to content

Commit 313db63

Browse files
committed
test: add multi includes, issue #18
1 parent e4f2a57 commit 313db63

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

test/includes/1.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h2>1</h2>
2+
<include src="./includes/2.html"></include>

test/includes/2.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h2>2</h2>

test/test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ describe('Simple test', function() {
3434
);
3535
});
3636

37+
it('multi includes', function(done) {
38+
test(
39+
'<h1>index</h1><include src="./includes/1.html"></include>',
40+
'<h1>index</h1><h2>1</h2>\n<h2>2</h2>',
41+
{ root: './test/' },
42+
done
43+
);
44+
});
45+
3746
it('addDependencyTo option', function(done) {
3847
var includePath = require('path').resolve('./test/blocks/button/button.html');
3948

0 commit comments

Comments
 (0)