File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -9,18 +9,23 @@ var request = require('request');
9
9
var test = require ( 'tape' ) ;
10
10
var gm = require ( 'gm' ) ;
11
11
12
+ var touch = function ( fileName ) {
13
+ fs . closeSync ( fs . openSync ( fileName , 'w' ) ) ;
14
+ } ;
15
+
12
16
13
17
// make artifact folders
14
- if ( ! fs . existsSync ( constants . pathToTestImagesDiff ) ) fs . mkdirSync ( constants . pathToTestImagesDiff ) ;
15
- if ( ! fs . existsSync ( constants . pathToTestImages ) ) fs . mkdirSync ( constants . pathToTestImages ) ;
18
+ if ( ! fs . existsSync ( constants . pathToTestImagesDiff ) ) {
19
+ fs . mkdirSync ( constants . pathToTestImagesDiff ) ;
20
+ }
21
+ if ( ! fs . existsSync ( constants . pathToTestImages ) ) {
22
+ fs . mkdirSync ( constants . pathToTestImages ) ;
23
+ }
16
24
17
25
var userFileName = process . argv [ 2 ] ;
18
26
19
- var touch = function ( fileName ) {
20
- fs . closeSync ( fs . openSync ( fileName , 'w' ) ) ;
21
- } ;
22
-
23
- if ( ! userFileName ) runAll ( ) ;
27
+ // run the test(s)
28
+ if ( ! userFileName ) runAll ( ) ;
24
29
else runSingle ( userFileName ) ;
25
30
26
31
function runAll ( ) {
@@ -107,7 +112,6 @@ function testMock (fileName, t) {
107
112
}
108
113
109
114
request ( options )
110
- . on ( 'response' , function ( ) { console . log ( 'pong' ) } )
111
115
. pipe ( savedImageStream )
112
116
. on ( 'close' , checkImage ) ;
113
117
}
You can’t perform that action at this time.
0 commit comments