diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-08 14:42:37 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-08 14:42:37 +0200 |
commit | 4e41f96d89d08bd6319d0a3c6439252f002b04d0 (patch) | |
tree | ef02cbd2a8eefcbb6ff2323bbf9f00c8324465a0 /test | |
parent | 325c32b4c9743e444968201b00b5f9b8841fa655 (diff) | |
download | gitbook-4e41f96d89d08bd6319d0a3c6439252f002b04d0.zip gitbook-4e41f96d89d08bd6319d0a3c6439252f002b04d0.tar.gz gitbook-4e41f96d89d08bd6319d0a3c6439252f002b04d0.tar.bz2 |
Add "languages" property to all json files for multilingual book
Diffstat (limited to 'test')
-rw-r--r-- | test/output-json.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/output-json.js b/test/output-json.js index 1006dab..cb29119 100644 --- a/test/output-json.js +++ b/test/output-json.js @@ -41,8 +41,23 @@ describe('JSON Output', function() { output.should.have.file('fr/README.json'); }); + it('should correctly add languages list to all json', function() { + var jsonFR = require(output.resolve('fr/README.json')); + var jsonEN = require(output.resolve('en/README.json')); + + jsonFR.should.have.property('languages') + .with.property('list').with.lengthOf(2); + jsonEN.should.have.property('languages') + .with.property('list').with.lengthOf(2); + }); + it('should correctly generate a README.json for the whole book', function() { output.should.have.file('README.json'); + + var json = require(output.resolve('README.json')); + + json.should.have.property('languages') + .with.property('list').with.lengthOf(2); }); }); }); |