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/init.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/init.js')
-rw-r--r-- | test/init.js | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/test/init.js b/test/init.js deleted file mode 100644 index 200f795..0000000 --- a/test/init.js +++ /dev/null @@ -1,57 +0,0 @@ -var Book = require('../lib/book'); -var mock = require('./mock'); - -describe('Init', function() { - - it('should create file according to summary', function() { - return mock.setupFS({ - 'SUMMARY.md': '# Summary\n\n' - + '* [Hello](hello.md)\n' - + '* [Hello 2](hello 2.md)\n' - }) - .then(function(rootFolder) { - return Book.init(mock.fs, rootFolder, { - log: function() {} - }) - .then(function() { - rootFolder.should.have.file('SUMMARY.md'); - rootFolder.should.have.file('README.md'); - rootFolder.should.have.file('hello.md'); - rootFolder.should.have.file('hello 2.md'); - }); - }); - }); - - it('should create file subfolder', function() { - return mock.setupFS({ - 'SUMMARY.md': '# Summary\n\n' - + '* [Hello](test/hello.md)\n' - + '* [Hello 2](test/test2/world.md)\n' - }) - .then(function(rootFolder) { - return Book.init(mock.fs, rootFolder, { - log: function() {} - }) - .then(function() { - rootFolder.should.have.file('README.md'); - rootFolder.should.have.file('SUMMARY.md'); - rootFolder.should.have.file('test/hello.md'); - rootFolder.should.have.file('test/test2/world.md'); - }); - }); - }); - - it('should create SUMMARY if non-existant', function() { - return mock.setupFS({}) - .then(function(rootFolder) { - return Book.init(mock.fs, rootFolder, { - log: function() {} - }) - .then(function() { - rootFolder.should.have.file('SUMMARY.md'); - rootFolder.should.have.file('README.md'); - }); - }); - }); - -}); |