Skip to content

Commit 9ee53c9

Browse files
committed
Merge pull request #616 from monfera/try-to-parse-json-only
Avoid `npm start` silently hanging forever on pollutants such as .DS_Store
2 parents 2750392 + 34e07fa commit 9ee53c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

devtools/test_dashboard/server.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ function readFiles(files) {
7272
}
7373

7474
function createMocksList(files) {
75-
var mocksList = files.map(function(file) {
75+
76+
// eliminate pollutants (e.g .DS_Store) that can accumulate in the mock directory
77+
var jsonFiles = files.filter(function(file) {return file.extname === '.json';});
78+
79+
var mocksList = jsonFiles.map(function(file) {
7680
var contents = JSON.parse(file.contents);
7781

7882
// get plot type keywords from mocks

0 commit comments

Comments
 (0)