summaryrefslogtreecommitdiffstats
path: root/test/configuration.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/configuration.js')
-rw-r--r--test/configuration.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/configuration.js b/test/configuration.js
new file mode 100644
index 0000000..6540d34
--- /dev/null
+++ b/test/configuration.js
@@ -0,0 +1,17 @@
+var path = require('path');
+var assert = require('assert');
+
+var Book = require('../').Book;
+
+describe('Configuration parsing', function () {
+ it('should correctly load from json', function(done) {
+ var book = new Book(path.join(__dirname, './fixtures/config'));
+ book.config.load()
+ .then(function() {
+ assert(book.options.title == "Test");
+ })
+ .then(function() {
+ done()
+ }, done);
+ });
+});