Skip to content

Commit 479ff83

Browse files
committed
move constants to top of file
1 parent 6d2e5f3 commit 479ff83

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/image/compare_pixels_test.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ var request = require('request');
99
var test = require('tape');
1010
var gm = require('gm');
1111

12+
var TOLERANCE = 1e-6; // pixel comparison tolerance
13+
var BASE_TIMEOUT = 500; // base timeout time
14+
var BATCH_SIZE = 5; // size of each test 'batch'
1215
var touch = function(fileName) {
1316
fs.closeSync(fs.openSync(fileName, 'w'));
1417
};
@@ -55,9 +58,7 @@ function runAll() {
5558
);
5659
});
5760

58-
var BASE_TIMEOUT = 500, // base timeout time
59-
BATCH_SIZE = 5, // size of each test 'batch'
60-
cnt = 0;
61+
var cnt = 0;
6162

6263
function testFunction() {
6364
testMock(mocks[cnt++], t);
@@ -98,7 +99,7 @@ function testMock(fileName, t) {
9899
var options = {
99100
file: diffPath,
100101
highlightColor: 'purple',
101-
tolerance: 1e-6
102+
tolerance: TOLERANCE
102103
};
103104

104105
/*

0 commit comments

Comments
 (0)