summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-09-13 09:34:06 -0400
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-09-14 01:51:19 +0300
commita15f0f3d53665f011964cedf3ff9139a8593f94e (patch)
treef6a5c0b93468061b63331060fb8413787be3342d
parente9914bf0344b0ef996f831ec2d80e5103df8b949 (diff)
downloadqtlocation-mapboxgl-a15f0f3d53665f011964cedf3ff9139a8593f94e.tar.gz
[node] Reflect GL JS changes in render.test.js
m---------mapbox-gl-js0
-rw-r--r--platform/node/test/render.test.js46
2 files changed, 1 insertions, 45 deletions
diff --git a/mapbox-gl-js b/mapbox-gl-js
-Subproject 44248ee7ad81478a3b06b07611ff9a53c5c0754
+Subproject 7d452eafbd8ecc008b6d934e20175f32bc7945b
diff --git a/platform/node/test/render.test.js b/platform/node/test/render.test.js
index b4933ce59e..812a531f20 100644
--- a/platform/node/test/render.test.js
+++ b/platform/node/test/render.test.js
@@ -4,48 +4,4 @@ const suite = require('../../../mapbox-gl-js/test/integration').render;
const suiteImplementation = require('./suite_implementation');
const ignores = require('./ignores.json');
-let tests;
-let shuffle = false;
-let recycleMap = false;
-let seed;
-
-// https://stackoverflow.com/a/1349426/229714
-function makeHash() {
- const array = [];
- const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-
- for (let i = 0; i < 10; ++i)
- array.push(possible.charAt(Math.floor(Math.random() * possible.length)));
-
- // join array elements without commas.
- return array.join('');
-}
-
-function checkParameter(param) {
- const index = tests.indexOf(param);
- if (index === -1)
- return false;
- tests.splice(index, 1);
- return true;
-}
-
-function checkValueParameter(defaultValue, param) {
- const index = tests.findIndex((elem) => { return String(elem).startsWith(param); });
- if (index === -1)
- return defaultValue;
-
- const split = String(tests.splice(index, 1)).split('=');
- if (split.length !== 2)
- return defaultValue;
-
- return split[1];
-}
-
-if (process.argv[1] === __filename && process.argv.length > 2) {
- tests = process.argv.slice(2).filter((value, index, self) => { return self.indexOf(value) === index; });
- shuffle = checkParameter('--shuffle');
- seed = checkValueParameter(makeHash(), '--seed');
- recycleMap = checkParameter('--recycle-map');
-}
-
-suite.run('native', { tests, ignores, shuffle, seed, recycleMap }, suiteImplementation);
+suite.run('native', ignores, suiteImplementation);