mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Add failing tests for block's arguments
This commit is contained in:
@@ -185,6 +185,13 @@ describe('Plugins', function () {
|
||||
content.should.equal("hello;the;world");
|
||||
});
|
||||
});
|
||||
|
||||
it('should correctly extend template blocks with arguments', function() {
|
||||
return testTpl('{% test5args "a", "b", "c" %}{% endtest5args %}')
|
||||
.then(function(content) {
|
||||
content.should.equal("test5a,b,ctest5");
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -36,6 +36,11 @@ module.exports = {
|
||||
assert(blk.blocks[1].name, "finally");
|
||||
return [blk.body, blk.blocks[0].body, blk.blocks[1].body].join(blk.kwargs.separator);
|
||||
}
|
||||
}
|
||||
},
|
||||
"test5args": {
|
||||
process: function(blk) {
|
||||
return "test5"+blk.args.join(',')+"test5";
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user