blob: 57bead9068651e657e6946a6b36245fa66091ef9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
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/configuration/json'));
book.config.load()
.then(function() {
assert(book.options.title == "Test");
})
.then(function() {
done()
}, done);
});
it('should correctly load from javascript', function(done) {
var book = new Book(path.join(__dirname, './fixtures/configuration/js'));
book.config.load()
.then(function() {
assert(book.options.title == "Test 2");
})
.then(function() {
done()
}, done);
});
});
|