Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1bad588

Browse files
committed
lint
1 parent 117a10e commit 1bad588

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

test/image/compare_pixels_test.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,23 @@ var request = require('request');
99
var test = require('tape');
1010
var 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

1725
var 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();
2429
else runSingle(userFileName);
2530

2631
function 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
}

0 commit comments

Comments
 (0)