summaryrefslogtreecommitdiffstats
path: root/test/configuration.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/configuration.js')
-rw-r--r--test/configuration.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/configuration.js b/test/configuration.js
new file mode 100644
index 0000000..f1fb223
--- /dev/null
+++ b/test/configuration.js
@@ -0,0 +1,25 @@
+var fs = require('fs');
+var path = require('path');
+
+describe('Configuration', function () {
+ it('should extract default title from README', function() {
+ return books.parse("basic")
+ .then(function(book) {
+ book.options.title.should.be.equal("Readme");
+ });
+ });
+
+ it('should correctly load from json (book.json)', function() {
+ return books.parse("config-json")
+ .then(function(book) {
+ book.options.title.should.be.equal("json-config");
+ });
+ });
+
+ it('should correctly load from JavaScript (book.js)', function() {
+ return books.parse("config-js")
+ .then(function(book) {
+ book.options.title.should.be.equal("js-config");
+ });
+ });
+});