diff options
author | Lukas Eipert <git@leipert.io> | 2018-04-10 23:58:01 +0200 |
---|---|---|
committer | Lukas Eipert <git@leipert.io> | 2018-04-10 23:58:01 +0200 |
commit | 6b8f1a1e15a71ec28eb639a2f424e3f202e22dea (patch) | |
tree | 780e3936dc9f7edb972278f62f936d1f6f92aba6 /spec/javascripts/test_bundle.js | |
parent | 7f2244eea5017c63abc227e31a08a28b66d25f35 (diff) | |
download | gitlab-ce-6b8f1a1e15a71ec28eb639a2f424e3f202e22dea.tar.gz |
remove `instanceof Array` test
Diffstat (limited to 'spec/javascripts/test_bundle.js')
-rw-r--r-- | spec/javascripts/test_bundle.js | 7 |
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 |