summaryrefslogtreecommitdiffstats
path: root/test/helper.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-22 17:12:46 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-22 17:12:46 +0100
commit57bdc102bc5565d50ac0c92f282f11d0a1fc99d8 (patch)
tree419ad847429d6d4e0b0a7edeb8a11e5430852bb0 /test/helper.js
parentbe651f0138664b35cae9a03a5c521dc138e48f2b (diff)
downloadgitbook-57bdc102bc5565d50ac0c92f282f11d0a1fc99d8.zip
gitbook-57bdc102bc5565d50ac0c92f282f11d0a1fc99d8.tar.gz
gitbook-57bdc102bc5565d50ac0c92f282f11d0a1fc99d8.tar.bz2
Fix tests of generations
Diffstat (limited to 'test/helper.js')
-rw-r--r--test/helper.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/helper.js b/test/helper.js
index 6e167ea..7e53151 100644
--- a/test/helper.js
+++ b/test/helper.js
@@ -3,6 +3,7 @@ var Q = require('q');
var fs = require('fs');
var _ = require('lodash');
+var fsUtil = require("../lib/utils/fs");
var Book = require('../').Book;
// Nicety for mocha / Q
@@ -48,6 +49,9 @@ before(function(done) {
qdone(
_.reduce(global.books, function(prev, book) {
return prev.then(function() {
+ return fsUtil.remove(path.join(book.root, "_book"));
+ })
+ .then(function() {
return book.parse();
});
}, Q()),