summaryrefslogtreecommitdiffstats
path: root/lib/output/__tests__/json.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-05-12 13:25:09 +0200
committerSamy Pessé <samypesse@gmail.com>2016-05-12 13:25:09 +0200
commitb97d1c7796659336f68c988f02d0f0376d1e9e82 (patch)
tree2cfcf3e7f9aa092b74c88579ff5727ddf5e4567c /lib/output/__tests__/json.js
parenta091c5b331282bbcc4e0a3b79fbc32dd6f842747 (diff)
downloadgitbook-b97d1c7796659336f68c988f02d0f0376d1e9e82.zip
gitbook-b97d1c7796659336f68c988f02d0f0376d1e9e82.tar.gz
gitbook-b97d1c7796659336f68c988f02d0f0376d1e9e82.tar.bz2
Fix languages not being added to json output
Diffstat (limited to 'lib/output/__tests__/json.js')
-rw-r--r--lib/output/__tests__/json.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/output/__tests__/json.js b/lib/output/__tests__/json.js
index 46ab42f..9897813 100644
--- a/lib/output/__tests__/json.js
+++ b/lib/output/__tests__/json.js
@@ -25,5 +25,22 @@ describe('JSONGenerator', function() {
expect(folder).toHaveFile('test/page.json');
});
});
+
+ it('should generate a multilingual book', function() {
+ return generateMock(JSONGenerator, {
+ 'LANGS.md': '# Languages\n\n* [en](en)\n* [fr](fr)',
+ 'en': {
+ 'README.md': 'Hello'
+ },
+ 'fr': {
+ 'README.md': 'Bonjour'
+ }
+ })
+ .then(function(folder) {
+ expect(folder).toHaveFile('en/README.json');
+ expect(folder).toHaveFile('fr/README.json');
+ expect(folder).toHaveFile('README.json');
+ });
+ });
});