Skip to content

Commit 2c7c2db

Browse files
authored
Merge pull request #630 from monfera/process-json-mocks-only
Ignore files in the mock directory that aren't .json (e.g. .DS_Store)
2 parents 32293e3 + 9f73f51 commit 2c7c2db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/image/compare_pixels_test.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ else runSingle(userFileName);
3636
function runAll() {
3737
test('testing mocks', function(t) {
3838

39-
var allMocks = fs.readdirSync(constants.pathToTestImageMocks);
39+
var fileNames = fs.readdirSync(constants.pathToTestImageMocks);
40+
41+
// eliminate pollutants (e.g .DS_Store) that can accumulate in the mock directory
42+
var allMocks = fileNames.filter(function(name) {return name.slice(-5) === '.json';});
4043

4144
/* Test cases:
4245
*

0 commit comments

Comments
 (0)