diff --git a/test/toc/fixtures/md/bullet.md b/test/toc/fixtures/md/bullet.md new file mode 100644 index 0000000..e2b8e2e --- /dev/null +++ b/test/toc/fixtures/md/bullet.md @@ -0,0 +1,5 @@ + + +# h1 +## h2 +### H3 diff --git a/test/toc/fixtures/toc-md/bullet.md b/test/toc/fixtures/toc-md/bullet.md new file mode 100644 index 0000000..6bc69e6 --- /dev/null +++ b/test/toc/fixtures/toc-md/bullet.md @@ -0,0 +1,10 @@ + +* [h1](#h1) + * [h2](#h2) + * [H3](#h3) + + + +# h1 +## h2 +### H3 diff --git a/test/toc/insert.js b/test/toc/insert.js index 5c1352d..d77627d 100644 --- a/test/toc/insert.js +++ b/test/toc/insert.js @@ -93,6 +93,19 @@ describe('TOC insert', function () { }); }); + it('must work \'bullet\' option', function (done) { + var files = readFiles('bullet'); + + toc.insert(files['toc-md'], { bullet: '*' }, function (err, res) { + if (err) { + done(err); + } else { + res.must.be.equal(files['toc-md']); + done(); + } + }); + }); + it('must handle headers with \'special characters\'', function (done) { var files = readFiles('special-characters');