1
1
/*global describe, it*/
2
2
3
- ' use strict' ;
3
+ " use strict" ;
4
4
5
- const fs = require ( 'fs' ) ;
6
- const es = require ( ' event-stream' ) ;
7
- const should = require ( ' should' ) ;
5
+ const fs = require ( "fs" ) ;
6
+ const es = require ( " event-stream" ) ;
7
+ const should = require ( " should" ) ;
8
8
9
- const File = require ( ' vinyl' ) ;
9
+ const File = require ( " vinyl" ) ;
10
10
11
- const doxdox = require ( ' ../../' ) ;
11
+ const doxdox = require ( " ../../" ) ;
12
12
13
- describe ( ' gulp-doxdox' , function ( ) {
13
+ describe ( " gulp-doxdox" , function ( ) {
14
14
15
15
const expectedFile = new File ( {
16
- path : ' test/fixtures/lodash.html' ,
17
- contents : fs . readFileSync ( ' test/fixtures/lodash.html' )
16
+ path : " test/fixtures/lodash.html" ,
17
+ contents : fs . readFileSync ( " test/fixtures/lodash.html" )
18
18
} ) ;
19
19
20
- it ( ' should produce expected file via buffer' , function ( done ) {
20
+ it ( " should produce expected file via buffer" , function ( done ) {
21
21
22
22
const srcFile = new File ( {
23
- path : ' test/fixtures/lodash.js' ,
24
- contents : fs . readFileSync ( ' test/fixtures/lodash.js' )
23
+ path : " test/fixtures/lodash.js" ,
24
+ contents : fs . readFileSync ( " test/fixtures/lodash.js" )
25
25
} ) ;
26
26
27
27
const stream = doxdox ( ) ;
28
28
29
- stream . on ( ' error' , function ( err ) {
29
+ stream . on ( " error" , function ( err ) {
30
30
should . exist ( err ) ;
31
31
done ( err ) ;
32
32
} ) ;
33
33
34
- stream . on ( ' data' , function ( newFile ) {
34
+ stream . on ( " data" , function ( newFile ) {
35
35
36
36
should . exist ( newFile ) ;
37
37
should . exist ( newFile . contents ) ;
@@ -48,21 +48,21 @@ describe('gulp-doxdox', function () {
48
48
49
49
} ) ;
50
50
51
- it ( ' should error on stream' , function ( done ) {
51
+ it ( " should error on stream" , function ( done ) {
52
52
53
53
const srcFile = new File ( {
54
- path : ' test/fixtures/lodash.js' ,
55
- contents : fs . createReadStream ( ' test/fixtures/lodash.js' )
54
+ path : " test/fixtures/lodash.js" ,
55
+ contents : fs . createReadStream ( " test/fixtures/lodash.js" )
56
56
} ) ;
57
57
58
58
const stream = doxdox ( ) ;
59
59
60
- stream . on ( ' error' , function ( err ) {
60
+ stream . on ( " error" , function ( err ) {
61
61
should . exist ( err ) ;
62
62
done ( ) ;
63
63
} ) ;
64
64
65
- stream . on ( ' data' , function ( newFile ) {
65
+ stream . on ( " data" , function ( newFile ) {
66
66
newFile . contents . pipe ( es . wait ( function ( err , data ) {
67
67
done ( err ) ;
68
68
} ) ) ;
0 commit comments