diff options
Diffstat (limited to 'test/locate.js')
-rw-r--r-- | test/locate.js | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/test/locate.js b/test/locate.js deleted file mode 100644 index f9adcd7..0000000 --- a/test/locate.js +++ /dev/null @@ -1,34 +0,0 @@ -var path = require('path'); -var should = require('should'); - -var mock = require('./mock'); - -describe('Locate', function() { - it('should use root folder if no .gitbook', function() { - return mock.setupBook({ - 'README.md': '# Hello' - }) - .then(function(book) { - return book.prepareConfig() - .then(function() { - should(book.originalRoot).not.be.ok(); - }); - }); - }); - - it('should use resolve using book.js root property', function() { - return mock.setupBook({ - 'README.md': '# Hello', - 'docs/README.md': '# Hello Book', - 'book.json': { root: './docs' } - }) - .then(function(book) { - return book.prepareConfig() - .then(function() { - should(book.originalRoot).be.ok(); - book.root.should.equal(path.resolve(book.originalRoot, 'docs')); - }); - }); - }); - -}); |