diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-04-30 22:06:16 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-04-30 22:06:16 +0200 |
commit | c1d53ec11fbe085932df911bda5686b7bf671f53 (patch) | |
tree | 97ae6db641eb79ec9b061af136a0b2e3c549db55 /test/structure.js | |
parent | 36b49c66c6b75515bc84dd678fd52121a313e8d2 (diff) | |
download | gitbook-c1d53ec11fbe085932df911bda5686b7bf671f53.zip gitbook-c1d53ec11fbe085932df911bda5686b7bf671f53.tar.gz gitbook-c1d53ec11fbe085932df911bda5686b7bf671f53.tar.bz2 |
Switch parsers to a model
Diffstat (limited to 'test/structure.js')
-rw-r--r-- | test/structure.js | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/test/structure.js b/test/structure.js deleted file mode 100644 index 0d043fe..0000000 --- a/test/structure.js +++ /dev/null @@ -1,51 +0,0 @@ -var fs = require('fs'); - -var mock = require('./mock'); -var WebsiteOutput = require('../lib/output/website'); - -/* - - Testing using configuration "structure" to use custom Readme/Summary/Glossary paths -*/ - -describe('Structure', function() { - var output; - - before(function() { - return mock.outputBook(WebsiteOutput, { - 'book.json': { - structure: { - readme: 'intro.md' - } - }, - 'SUMMARY.md': '* [Test](test.md)', - 'intro.md': 'This is the intro', - 'test.md': 'Go to [intro](intro.md)' - }) - .then(function(_output) { - output = _output; - }); - }); - - it('should generate index.html', function() { - output.should.have.file('index.html'); - }); - - it('should generate test.html', function() { - output.should.have.file('test.html'); - }); - - it('should correctly resolve link to Readme', function() { - var readme = fs.readFileSync(output.resolve('test.html'), 'utf-8'); - - readme.should.be.html({ - '.page-inner a': { - count: 1, - text: 'intro', - attributes: { - href: './' - } - } - }); - }); -}); |