From 9c8d58b8f3592a0c03935aaa4ce7868d80b90f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Tusz?= Date: Mon, 20 Jun 2016 12:50:37 -0400 Subject: [PATCH] Devtools: Fix mock-file filter function --- devtools/test_dashboard/server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devtools/test_dashboard/server.js b/devtools/test_dashboard/server.js index 5fae32d1ddb..9dfba98dad7 100644 --- a/devtools/test_dashboard/server.js +++ b/devtools/test_dashboard/server.js @@ -74,7 +74,9 @@ function readFiles(files) { function createMocksList(files) { // eliminate pollutants (e.g .DS_Store) that can accumulate in the mock directory - var jsonFiles = files.filter(function(file) {return file.extname === '.json';}); + var jsonFiles = files.filter(function(file) { + return file.name.substr(-5) === '.json'; + }); var mocksList = jsonFiles.map(function(file) { var contents = JSON.parse(file.contents);