diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-19 10:08:49 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-19 10:08:49 +0100 |
commit | d9c020194d949bd7591c51f6a6bfb48612f39a09 (patch) | |
tree | d9715f3fda2751481a89a2afcfa9ada2a1d8ccb7 /test/configuration.js | |
parent | ec586dd3cdf06e9567f5d3e4961022ddc3c94778 (diff) | |
download | gitbook-d9c020194d949bd7591c51f6a6bfb48612f39a09.zip gitbook-d9c020194d949bd7591c51f6a6bfb48612f39a09.tar.gz gitbook-d9c020194d949bd7591c51f6a6bfb48612f39a09.tar.bz2 |
Add base object to load configuration
Diffstat (limited to 'test/configuration.js')
-rw-r--r-- | test/configuration.js | 17 |
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); + }); +}); |