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/parse.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/parse.js')
-rw-r--r-- | test/parse.js | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/test/parse.js b/test/parse.js deleted file mode 100644 index 63565ee..0000000 --- a/test/parse.js +++ /dev/null @@ -1,59 +0,0 @@ -var mock = require('./mock'); - -describe('Parsing', function() { - it('should not fail without SUMMARY', function() { - return mock.setupBook({ - 'README.md': '' - }) - .then(function(book) { - return book.parse().should.be.fulfilled(); - }); - }); - - it('should fail without README', function() { - return mock.setupBook({ - 'SUMMARY.md': '' - }) - .then(function(book) { - return book.parse().should.be.rejected; - }); - }); - - it('should add GLOSSARY as a page', function() { - return mock.setupDefaultBook({ - 'GLOSSARY.md': '' - }) - .then(function(book) { - return book.parse() - .then(function() { - book.hasPage('GLOSSARY.md').should.equal(true); - }); - }); - }); - - describe('Multilingual book', function() { - var book; - - before(function() { - return mock.setupBook({ - 'LANGS.md': '# Languages\n\n' - + '* [English](./en)\n' - + '* [French](./fr)\n\n', - 'en/README.md': '# English', - 'en/SUMMARY.md': '# Summary', - 'fr/README.md': '# French', - 'fr/SUMMARY.md': '# Summary' - }) - .then(function(_book) { - book = _book; - return book.parse(); - }); - }); - - it('should list language books', function() { - book.isMultilingual().should.equal(true); - book.books.should.have.lengthOf(2); - }); - }); -}); - |