Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLukas Eipert <git@leipert.io>2018-04-11 00:58:01 +0300
committerLukas Eipert <git@leipert.io>2018-04-11 00:58:01 +0300
commit6b8f1a1e15a71ec28eb639a2f424e3f202e22dea (patch)
tree780e3936dc9f7edb972278f62f936d1f6f92aba6 /spec
parent7f2244eea5017c63abc227e31a08a28b66d25f35 (diff)
remove `instanceof Array` test
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/test_bundle.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index 0fb037efa25..69ccd13491f 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -71,13 +71,12 @@ beforeEach(() => {
const axiosDefaultAdapter = getDefaultAdapter();
-let testFiles = process.env.TEST_FILES;
-if (testFiles instanceof Array && testFiles.length > 0) {
- console.log(`Running only tests: ${testFiles}`);
+let testFiles = process.env.TEST_FILES || [];
+if (testFiles.length > 0) {
testFiles = testFiles.map(path => path.replace(/^spec\/javascripts\//, '').replace(/\.js$/, ''));
+ console.log(`Running only tests matching: ${testFiles}`);
} else {
console.log('Running all tests');
- testFiles = [];
}
// render all of our tests