summaryrefslogtreecommitdiffstats
path: root/test/output-website.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-18 12:13:24 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-18 12:13:24 +0100
commit576d773fecf5ec6a7ebf5b089ff7a03b102468eb (patch)
treec6967bf852bc8405e410c7f738f0c00c6c728531 /test/output-website.js
parent58a930e456860a025cb8565effe73fb3ae437882 (diff)
downloadgitbook-576d773fecf5ec6a7ebf5b089ff7a03b102468eb.zip
gitbook-576d773fecf5ec6a7ebf5b089ff7a03b102468eb.tar.gz
gitbook-576d773fecf5ec6a7ebf5b089ff7a03b102468eb.tar.bz2
Correctly map filenames for website output
Diffstat (limited to 'test/output-website.js')
-rw-r--r--test/output-website.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/output-website.js b/test/output-website.js
index bc15bcc..9fe1928 100644
--- a/test/output-website.js
+++ b/test/output-website.js
@@ -24,5 +24,38 @@ describe('Website Output', function() {
});
+ describe('Book with chapters', function() {
+ var output;
+
+ before(function() {
+ return mock.outputDefaultBook(WebsiteOutput, {
+ 'hello/README.md': '# Hello',
+ 'hello/test.md': '# Test'
+ }, [
+ {
+ title: 'Hello',
+ path: 'hello/README.md'
+ },
+ {
+ title: 'Test',
+ path: 'hello/test.md'
+ }
+ ])
+ .then(function(_output) {
+ output = _output;
+ });
+ });
+
+ it('should correctly generate an index.html', function() {
+ output.should.have.file('index.html');
+ });
+
+ it('should correctly generate files in folder', function() {
+ output.should.have.file('hello/index.html');
+ output.should.have.file('hello/test.html');
+ });
+
+ });
+
});