summaryrefslogtreecommitdiffstats
path: root/test/generation.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/generation.js')
-rw-r--r--test/generation.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/generation.js b/test/generation.js
index b043885..d339837 100644
--- a/test/generation.js
+++ b/test/generation.js
@@ -24,7 +24,11 @@ describe('Book generation', function () {
it('should correctly generate a book to json', function(done) {
testGeneration(book1, "json", function(output) {
assert(!fs.existsSync(path.join(output, "README.json")));
- assert(fs.existsSync(path.join(output, "intro.json")))
+ assert(fs.existsSync(path.join(output, "intro.json")));
+ assert(fs.existsSync(path.join(output, "sub/test1.json")));
+
+ var test1 = JSON.parse(fs.readFileSync(path.join(output, "sub/test1.json")));
+ assert(test1.sections[0].content.indexOf("intro.html") > 0);
}, done);
});