File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 19
19
"codecov" : " 1.0.1" ,
20
20
"eslint" : " 3.8.1" ,
21
21
"istanbul" : " 0.4.5" ,
22
- "mocha" : " 3.1.2"
22
+ "mocha" : " 3.1.2" ,
23
+ "mock-fs" : " 3.11.0"
23
24
},
24
25
"scripts" : {
25
26
"test" : " make lint && make coverage"
Original file line number Diff line number Diff line change 1
1
const assert = require ( 'assert' ) ;
2
2
const fs = require ( 'fs' ) ;
3
3
4
+ const mock = require ( 'mock-fs' ) ;
5
+
4
6
const doxdox = require ( '../../lib/doxdox' ) ;
5
7
6
8
describe ( 'doxdox' , ( ) => {
@@ -19,6 +21,32 @@ describe('doxdox', () => {
19
21
20
22
} ) ;
21
23
24
+ describe ( 'parseInput' , ( ) => {
25
+
26
+ before ( ( ) => {
27
+
28
+ mock ( ) ;
29
+
30
+ } ) ;
31
+
32
+ it ( 'fails to parse input from invalid file' , done => {
33
+
34
+ doxdox . parseInput ( '' , { 'parser' : 'dox' } ) . catch ( err => {
35
+
36
+ done ( ) ;
37
+
38
+ } ) ;
39
+
40
+ } ) ;
41
+
42
+ after ( ( ) => {
43
+
44
+ mock . restore ( ) ;
45
+
46
+ } ) ;
47
+
48
+ } ) ;
49
+
22
50
describe ( 'parseInputs' , ( ) => {
23
51
24
52
it ( 'parses multiple input from array' , done => {
You can’t perform that action at this time.
0 commit comments