diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-19 15:26:31 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-19 15:26:31 +0100 |
commit | 793600ab2fe3923062b06dd25e59655805882409 (patch) | |
tree | c385fbadece8b41b69dbd995a94744a1370f01e2 /test/helper.js | |
parent | 354b4afba1ddd1f86fb587da0c74388df89dbc28 (diff) | |
download | gitbook-793600ab2fe3923062b06dd25e59655805882409.zip gitbook-793600ab2fe3923062b06dd25e59655805882409.tar.gz gitbook-793600ab2fe3923062b06dd25e59655805882409.tar.bz2 |
Improve test to test a all book
Diffstat (limited to 'test/helper.js')
-rw-r--r-- | test/helper.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/helper.js b/test/helper.js new file mode 100644 index 0000000..f80edcb --- /dev/null +++ b/test/helper.js @@ -0,0 +1,19 @@ +var path = require('path'); +var Q = require('q'); +var Book = require('../').Book; + +// Nicety for mocha / Q +global.qdone = function qdone(promise, done) { + return promise.then(function() { + return done(); + }, function(err) { + return done(err); + }).done(); +}; + +// Init before doing tests +before(function(done) { + global.book1 = new Book(path.join(__dirname, './fixtures/test1')); + + qdone(global.book1.init(), done); +}); |