diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-21 22:51:59 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-21 22:51:59 +0100 |
commit | 85930161f7a32c6c5c7de82a47554ed2855c14df (patch) | |
tree | 5c784ec80b59dd71867527d1658b1b5186b73a1e /test/generation.js | |
parent | 4f9ece1ec114901d817c77e584b933f195ece923 (diff) | |
download | gitbook-85930161f7a32c6c5c7de82a47554ed2855c14df.zip gitbook-85930161f7a32c6c5c7de82a47554ed2855c14df.tar.gz gitbook-85930161f7a32c6c5c7de82a47554ed2855c14df.tar.bz2 |
Normalize tests
Diffstat (limited to 'test/generation.js')
-rw-r--r-- | test/generation.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/generation.js b/test/generation.js index d2d0574..1d73068 100644 --- a/test/generation.js +++ b/test/generation.js @@ -22,7 +22,7 @@ var testGeneration = function(book, type, func, done) { describe('Book generation', function () { it('should correctly generate a book to json', function(done) { - testGeneration(book1, "json", function(output) { + testGeneration(books[1], "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, "sub/test1.json"))); @@ -32,25 +32,25 @@ describe('Book generation', function () { }, done); }); - it('should correctly generate an asciidoc book to json', function(done) { - testGeneration(book3, "json", function(output) { + it('should correctly generate a multilingual book to json', function(done) { + testGeneration(books[2], "json", function(output) { assert(fs.existsSync(path.join(output, "README.json"))); - assert(fs.existsSync(path.join(output, "test.json"))); - assert(fs.existsSync(path.join(output, "test1.json"))); - assert(fs.existsSync(path.join(output, "test2.json"))); + assert(fs.existsSync(path.join(output, "en/README.json"))); + assert(fs.existsSync(path.join(output, "fr/README.json"))); }, done); }); - it('should correctly generate a multilingual book to json', function(done) { - testGeneration(book2, "json", function(output) { + it('should correctly generate an asciidoc book to json', function(done) { + testGeneration(books[3], "json", function(output) { assert(fs.existsSync(path.join(output, "README.json"))); - assert(fs.existsSync(path.join(output, "en/README.json"))); - assert(fs.existsSync(path.join(output, "fr/README.json"))); + assert(fs.existsSync(path.join(output, "test.json"))); + assert(fs.existsSync(path.join(output, "test1.json"))); + assert(fs.existsSync(path.join(output, "test2.json"))); }, done); }); it('should correctly generate a book to website', function(done) { - testGeneration(book1, "site", function(output) { + testGeneration(books[1], "site", function(output) { assert(fs.existsSync(path.join(output, "index.html"))); }, done); }); |