diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-04-28 21:25:58 +0200 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-04-28 21:25:58 +0200 |
commit | 826f90505c1a70ad2a8cf3715bac6d5efaeba22c (patch) | |
tree | a35600d555ff0268f6eb2fc1bd9c44c06438eb27 /lib/__tests__ | |
parent | 7ae36f16c84238340dd6b39a75423f5e95f27bbc (diff) | |
download | gitbook-826f90505c1a70ad2a8cf3715bac6d5efaeba22c.zip gitbook-826f90505c1a70ad2a8cf3715bac6d5efaeba22c.tar.gz gitbook-826f90505c1a70ad2a8cf3715bac6d5efaeba22c.tar.bz2 |
Add command "init"
Diffstat (limited to 'lib/__tests__')
-rw-r--r-- | lib/__tests__/gitbook.js | 2 | ||||
-rw-r--r-- | lib/__tests__/init.js | 16 |
2 files changed, 16 insertions, 2 deletions
diff --git a/lib/__tests__/gitbook.js b/lib/__tests__/gitbook.js index b45fe70..c3669bb 100644 --- a/lib/__tests__/gitbook.js +++ b/lib/__tests__/gitbook.js @@ -1,5 +1,3 @@ -jest.autoMockOff(); - var gitbook = require('../gitbook'); describe('satisfies', function() { diff --git a/lib/__tests__/init.js b/lib/__tests__/init.js new file mode 100644 index 0000000..5665cf1 --- /dev/null +++ b/lib/__tests__/init.js @@ -0,0 +1,16 @@ +var tmp = require('tmp'); +var initBook = require('../init'); + +describe('initBook', function() { + + pit('should create a README and SUMMARY for empty book', function() { + var dir = tmp.dirSync(); + + return initBook(dir.name) + .then(function() { + expect(dir.name).toHaveFile('README.md'); + expect(dir.name).toHaveFile('SUMMARY.md'); + }); + }); + +}); |