diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-19 22:39:23 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-19 22:39:23 +0100 |
commit | c15399613cf3e589eb106d37221fae9c54002d74 (patch) | |
tree | 0ae3f7140eccbbbe0a3b156400179acec29a8e0e /test/generation.js | |
parent | d6f7f1f4fb12ac1c24624aa8358f8149ec720622 (diff) | |
download | gitbook-c15399613cf3e589eb106d37221fae9c54002d74.zip gitbook-c15399613cf3e589eb106d37221fae9c54002d74.tar.gz gitbook-c15399613cf3e589eb106d37221fae9c54002d74.tar.bz2 |
Normalize paths in html content
Diffstat (limited to 'test/generation.js')
-rw-r--r-- | test/generation.js | 6 |
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); }); |