diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-27 21:47:14 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-27 21:47:14 +0100 |
commit | bc389ab4a1ea9013a869c0b33162fb67bb0d0708 (patch) | |
tree | fd1904c5fc59495190e7b8f4035519dbe642873d /test/plugins | |
parent | cf12d090928907bb82c9f1796b642cbef9b42640 (diff) | |
download | gitbook-bc389ab4a1ea9013a869c0b33162fb67bb0d0708.zip gitbook-bc389ab4a1ea9013a869c0b33162fb67bb0d0708.tar.gz gitbook-bc389ab4a1ea9013a869c0b33162fb67bb0d0708.tar.bz2 |
Improve tests on blocks extensions
Diffstat (limited to 'test/plugins')
-rw-r--r-- | test/plugins/blocks/index.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/plugins/blocks/index.js b/test/plugins/blocks/index.js index f2c588a..b8f72fe 100644 --- a/test/plugins/blocks/index.js +++ b/test/plugins/blocks/index.js @@ -1,3 +1,5 @@ +var assert = require("assert"); + module.exports = { blocks: { "test": { @@ -18,6 +20,17 @@ module.exports = { process: function(blk) { return [blk.body, blk.blocks[0].body].join(blk.kwargs.separator); } + }, + "test4join": { + blocks: [ + "also", "finally" + ], + process: function(blk) { + assert(blk.blocks.length, 2); + assert(blk.blocks[0].name, "also"); + assert(blk.blocks[1].name, "finally"); + return [blk.body, blk.blocks[0].body, blk.blocks[1].body].join(blk.kwargs.separator); + } } } };
\ No newline at end of file |