summaryrefslogtreecommitdiffstats
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
parentbe651f0138664b35cae9a03a5c521dc138e48f2b (diff)
downloadgitbook-57bdc102bc5565d50ac0c92f282f11d0a1fc99d8.zip
gitbook-57bdc102bc5565d50ac0c92f282f11d0a1fc99d8.tar.gz
gitbook-57bdc102bc5565d50ac0c92f282f11d0a1fc99d8.tar.bz2
Fix tests of generations
-rw-r--r--test/helper.js4
-rw-r--r--test/json.js1
2 files changed, 4 insertions, 1 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()),
diff --git a/test/json.js b/test/json.js
index cc01700..1af2517 100644
--- a/test/json.js
+++ b/test/json.js
@@ -3,7 +3,6 @@ var _ = require('lodash');
var assert = require('assert');
var fs = require("fs");
-var fsUtil = require("../lib/utils/fs");
describe('JSON generator', function () {
it('should correctly generate a book to json', function(done) {