summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-08-28 18:12:19 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-08-30 16:44:08 +0300
commit9326055fa6b56f318b3d375af64e56cdf9968a16 (patch)
tree77e67a8ad228b113e54fd30a0db5bc897e518bdf
parentb72620456d2305594ed1620623c0b827e47ab16e (diff)
downloadqtlocation-mapboxgl-9326055fa6b56f318b3d375af64e56cdf9968a16.tar.gz
[test] Interpret render tests params: --recycleMap and --shuffle
-rw-r--r--platform/node/test/render.test.js16
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);