diff options
-rw-r--r-- | test/fixtures/test5/README.md | 3 | ||||
-rw-r--r-- | test/fixtures/test5/SUMMARY.md | 1 | ||||
-rw-r--r-- | test/fixtures/test5/test.md | 1 | ||||
-rw-r--r-- | test/json.js | 9 |
4 files changed, 14 insertions, 0 deletions
diff --git a/test/fixtures/test5/README.md b/test/fixtures/test5/README.md new file mode 100644 index 0000000..67536b3 --- /dev/null +++ b/test/fixtures/test5/README.md @@ -0,0 +1,3 @@ +# Test Content inclusion + +{% include "./test.md" %} diff --git a/test/fixtures/test5/SUMMARY.md b/test/fixtures/test5/SUMMARY.md new file mode 100644 index 0000000..ac9323c --- /dev/null +++ b/test/fixtures/test5/SUMMARY.md @@ -0,0 +1 @@ +# Summary diff --git a/test/fixtures/test5/test.md b/test/fixtures/test5/test.md new file mode 100644 index 0000000..5e1c309 --- /dev/null +++ b/test/fixtures/test5/test.md @@ -0,0 +1 @@ +Hello World
\ No newline at end of file diff --git a/test/json.js b/test/json.js index 1620d00..5852df7 100644 --- a/test/json.js +++ b/test/json.js @@ -41,4 +41,13 @@ describe('JSON generator', function () { assert(fs.existsSync(path.join(output, "test2.json"))); }, done); }); + + it('should correctly generate a book with inclusion', function(done) { + testGeneration(books[5], "json", function(output) { + assert(fs.existsSync(path.join(output, "README.json"))); + + var readme = JSON.parse(fs.readFileSync(path.join(output, "README.json"))); + assert(readme.sections[0].content.indexOf('Hello World') > 0); + }, done); + }); }); |