From 501614e422a2947be42de2d61c57f836c4eda02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Mon, 1 Apr 2019 10:55:48 -0400 Subject: [PATCH] fix `npm run test-image -- *` for mock lists w/o gl2d_* mocks --- test/image/compare_pixels_test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/image/compare_pixels_test.js b/test/image/compare_pixels_test.js index 4a75b24c55a..3e9010b8321 100644 --- a/test/image/compare_pixels_test.js +++ b/test/image/compare_pixels_test.js @@ -91,8 +91,7 @@ sortGl2dMockList(allMockList); // main if(isInQueue) { runInQueue(allMockList); -} -else { +} else { runInBatch(allMockList); } @@ -137,6 +136,7 @@ function sortGl2dMockList(mockList) { mockNames.forEach(function(m) { var ind = mockList.indexOf(m); + if(ind === -1) return; var tmp = mockList[pos]; mockList[pos] = m; mockList[ind] = tmp;