summaryrefslogtreecommitdiffstats
path: root/lib/constants/__tests__
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-05-23 12:48:46 +0200
committerSamy Pessé <samypesse@gmail.com>2016-05-23 12:48:46 +0200
commitb856bff91b843585b653351c70941865cfe576a3 (patch)
treedc54746b90ac31f68494ecee4c256eeb328a8c2d /lib/constants/__tests__
parent0744f000f9a0274279397a1a6635e4d7bbb9e718 (diff)
downloadgitbook-b856bff91b843585b653351c70941865cfe576a3.zip
gitbook-b856bff91b843585b653351c70941865cfe576a3.tar.gz
gitbook-b856bff91b843585b653351c70941865cfe576a3.tar.bz2
Add failing test for #1316
Diffstat (limited to 'lib/constants/__tests__')
-rw-r--r--lib/constants/__tests__/configSchema.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/constants/__tests__/configSchema.js b/lib/constants/__tests__/configSchema.js
new file mode 100644
index 0000000..546ec82
--- /dev/null
+++ b/lib/constants/__tests__/configSchema.js
@@ -0,0 +1,26 @@
+var jsonschema = require('jsonschema');
+var schema = require('../configSchema');
+
+describe('configSchema', function() {
+
+ function validate(cfg) {
+ var v = new jsonschema.Validator();
+ return v.validate(cfg, schema, {
+ propertyName: 'config'
+ });
+ }
+
+ describe('structure', function() {
+
+ it('should accept dot in filename', function() {
+ var result = validate({
+ structure: {
+ readme: 'book-intro.adoc'
+ }
+ });
+
+ expect(result.errors.length).toBe(0);
+ });
+
+ });
+});