Files
gitbook/test/helper.js
T
2015-01-19 15:26:31 +01:00

20 lines
447 B
JavaScript

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);
});