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');
99var test = require ( 'tape' ) ;
1010var gm = require ( 'gm' ) ;
1111
12+ var touch = function ( fileName ) {
13+ fs . closeSync ( fs . openSync ( fileName , 'w' ) ) ;
14+ } ;
15+
1216
1317// 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+ }
1624
1725var userFileName = process . argv [ 2 ] ;
1826
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 ( ) ;
2429else runSingle ( userFileName ) ;
2530
2631function runAll ( ) {
@@ -107,7 +112,6 @@ function testMock (fileName, t) {
107112 }
108113
109114 request ( options )
110- . on ( 'response' , function ( ) { console . log ( 'pong' ) } )
111115 . pipe ( savedImageStream )
112116 . on ( 'close' , checkImage ) ;
113117}
You can’t perform that action at this time.
0 commit comments