diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-19 18:49:02 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-19 18:49:02 +0100 |
commit | 6344928580e521974508d445238c207aecec299b (patch) | |
tree | ecf21b32a777115b4fdec1adbdbd7ec987adbd7d /test/generation.js | |
parent | 2dbf9b0d4a88a6461ca60f49f3d66ccd42143be3 (diff) | |
download | gitbook-6344928580e521974508d445238c207aecec299b.zip gitbook-6344928580e521974508d445238c207aecec299b.tar.gz gitbook-6344928580e521974508d445238c207aecec299b.tar.bz2 |
Write file in json generator
Diffstat (limited to 'test/generation.js')
-rw-r--r-- | test/generation.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/generation.js b/test/generation.js index 2083ca0..4176c8a 100644 --- a/test/generation.js +++ b/test/generation.js @@ -2,8 +2,16 @@ var path = require('path'); var _ = require('lodash'); var assert = require('assert'); +var fs = require('../lib/utils/fs'); + describe('Book generation', function () { it('should correctly generate a book with json', function(done) { - qdone(book1.generate("json"), done); + var OUTPUT_PATH = book1.options.output; + + qdone( + book1.generate("json") + .fin(function() { + return fs.remove(OUTPUT_PATH); + }), done); }); }); |