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-31 10:17:21 +0300 |
commit | b43d88b7253d641fe24fcc030a58f207b2e33f10 (patch) | |
tree | 441badd4f2e95203958f50eb6cda70a89bed6fb1 | |
parent | 6ee8d7bb60d333c2ca8f45dc79975c38ceed45a5 (diff) | |
download | qtlocation-mapboxgl-b43d88b7253d641fe24fcc030a58f207b2e33f10.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); |