mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-20 17:43:24 +00:00
20 lines
447 B
JavaScript
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);
|
|
});
|