diff options
author | Samy Pesse <samypesse@gmail.com> | 2015-09-14 11:28:14 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2015-09-14 11:28:14 +0200 |
commit | fa4e234bab15db4b0a8a0a13f041ef5869a2458b (patch) | |
tree | 243816b5b7a243915b44a590cb40e5ce4c731b21 /test/helper.js | |
parent | 35c4179ca12a0287279ced0535f11237cdf606ec (diff) | |
download | gitbook-fa4e234bab15db4b0a8a0a13f041ef5869a2458b.zip gitbook-fa4e234bab15db4b0a8a0a13f041ef5869a2458b.tar.gz gitbook-fa4e234bab15db4b0a8a0a13f041ef5869a2458b.tar.bz2 |
Add base test for extending code highlighting
Diffstat (limited to 'test/helper.js')
-rw-r--r-- | test/helper.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/helper.js b/test/helper.js index ef5c45c..f4432a9 100644 --- a/test/helper.js +++ b/test/helper.js @@ -17,18 +17,18 @@ var TMPDIR = os.tmpdir(); // Generate and return a book -function generateBook(bookId, test, options) { - options = _.defaults(options || {}, { - before: function() {} +function generateBook(bookId, test, opts) { + opts = _.defaults(opts || {}, { + prepare: function() {} }); return parseBook(bookId, test) .then(function(book) { - return Q(options.before(book)) - .thenResolve(book); - }) - .then(function(book) { - return book.generate(test) + + return Q(opts.prepare(book)) + .then(function() { + return book.generate(test); + }) .thenResolve(book); }); } |