diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-08-28 18:12:19 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-08-30 16:44:08 +0300 |
commit | 9326055fa6b56f318b3d375af64e56cdf9968a16 (patch) | |
tree | 77e67a8ad228b113e54fd30a0db5bc897e518bdf | |
parent | b72620456d2305594ed1620623c0b827e47ab16e (diff) | |
download | qtlocation-mapboxgl-9326055fa6b56f318b3d375af64e56cdf9968a16.tar.gz |
[test] Interpret render tests params: --recycleMap and --shuffle
-rw-r--r-- | platform/node/test/render.test.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/platform/node/test/render.test.js b/platform/node/test/render.test.js index c8a214e919..ce549c1e27 100644 --- a/platform/node/test/render.test.js +++ b/platform/node/test/render.test.js @@ -5,9 +5,21 @@ const suiteImplementation = require('./suite_implementation'); const ignores = require('./ignores.json'); let tests; +let shuffle = false; +let recycleMap = false; + +function checkParameter(param) { + const index = tests.indexOf(param); + if (index === -1) + return false; + tests.splice(index, 1); + return true; +} if (process.argv[1] === __filename && process.argv.length > 2) { - tests = process.argv.slice(2); + tests = process.argv.slice(2).filter((value, index, self) => { return self.indexOf(value) === index; }); + shuffle = checkParameter('--shuffle'); + recycleMap = checkParameter('--recycle-map'); } -suite.run('native', {tests: tests, ignores: ignores}, suiteImplementation); +suite.run('native', {tests, ignores, shuffle, recycleMap}, suiteImplementation); |