@deck.gl/test-utils 8.6.0 → 8.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es5/generate-layer-tests.js +65 -85
- package/dist/es5/generate-layer-tests.js.map +1 -1
- package/dist/es5/index.js +10 -10
- package/dist/es5/interaction-test-runner.js +37 -92
- package/dist/es5/interaction-test-runner.js.map +1 -1
- package/dist/es5/lifecycle-test.js +125 -273
- package/dist/es5/lifecycle-test.js.map +1 -1
- package/dist/es5/snapshot-test-runner.js +70 -109
- package/dist/es5/snapshot-test-runner.js.map +1 -1
- package/dist/es5/test-runner.js +96 -155
- package/dist/es5/test-runner.js.map +1 -1
- package/dist/es5/utils/dom.js +1 -1
- package/dist/es5/utils/dom.js.map +1 -1
- package/dist/es5/utils/precision.js +4 -12
- package/dist/es5/utils/precision.js.map +1 -1
- package/dist/es5/utils/setup-gl.js +1 -1
- package/dist/es5/utils/setup-gl.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,29 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.toLowPrecision = toLowPrecision;
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function toLowPrecision(input) {
|
|
13
|
-
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 11;
|
|
14
|
-
|
|
8
|
+
function toLowPrecision(input, precision = 11) {
|
|
15
9
|
if (typeof input === 'number') {
|
|
16
10
|
input = Number(input.toPrecision(precision));
|
|
17
11
|
}
|
|
18
12
|
|
|
19
13
|
if (Array.isArray(input)) {
|
|
20
|
-
input = input.map(
|
|
21
|
-
return toLowPrecision(item, precision);
|
|
22
|
-
});
|
|
14
|
+
input = input.map(item => toLowPrecision(item, precision));
|
|
23
15
|
}
|
|
24
16
|
|
|
25
|
-
if (
|
|
26
|
-
for (
|
|
17
|
+
if (typeof input === 'object') {
|
|
18
|
+
for (const key in input) {
|
|
27
19
|
input[key] = toLowPrecision(input[key], precision);
|
|
28
20
|
}
|
|
29
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/precision.js"],"names":["toLowPrecision","input","precision","Number","toPrecision","Array","isArray","map","item","key"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/precision.js"],"names":["toLowPrecision","input","precision","Number","toPrecision","Array","isArray","map","item","key"],"mappings":";;;;;;;AAOO,SAASA,cAAT,CAAwBC,KAAxB,EAA+BC,SAAS,GAAG,EAA3C,EAA+C;AAEpD,MAAI,OAAOD,KAAP,KAAiB,QAArB,EAA+B;AAC7BA,IAAAA,KAAK,GAAGE,MAAM,CAACF,KAAK,CAACG,WAAN,CAAkBF,SAAlB,CAAD,CAAd;AACD;;AACD,MAAIG,KAAK,CAACC,OAAN,CAAcL,KAAd,CAAJ,EAA0B;AACxBA,IAAAA,KAAK,GAAGA,KAAK,CAACM,GAAN,CAAUC,IAAI,IAAIR,cAAc,CAACQ,IAAD,EAAON,SAAP,CAAhC,CAAR;AACD;;AACD,MAAI,OAAOD,KAAP,KAAiB,QAArB,EAA+B;AAC7B,SAAK,MAAMQ,GAAX,IAAkBR,KAAlB,EAAyB;AACvBA,MAAAA,KAAK,CAACQ,GAAD,CAAL,GAAaT,cAAc,CAACC,KAAK,CAACQ,GAAD,CAAN,EAAaP,SAAb,CAA3B;AACD;AACF;;AACD,SAAOD,KAAP;AACD","sourcesContent":["/**\n * Covert all numbers in a deep structure to a given precision, allowing\n * reliable float comparisons. Converts data in-place.\n * @param {mixed} input Input data\n * @param {Number} [precision] Desired precision\n * @return {mixed} Input data, with all numbers converted\n */\nexport function toLowPrecision(input, precision = 11) {\n /* eslint-disable guard-for-in */\n if (typeof input === 'number') {\n input = Number(input.toPrecision(precision));\n }\n if (Array.isArray(input)) {\n input = input.map(item => toLowPrecision(item, precision));\n }\n if (typeof input === 'object') {\n for (const key in input) {\n input[key] = toLowPrecision(input[key], precision);\n }\n }\n return input;\n}\n"],"file":"precision.js"}
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _testUtils = require("@luma.gl/test-utils");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
const _global = typeof global !== 'undefined' ? global : window;
|
|
11
11
|
|
|
12
12
|
_global.glContext = _global.glContext || (0, _testUtils.createTestContext)({
|
|
13
13
|
width: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/setup-gl.js"],"names":["_global","global","window","glContext","width","height","debug"],"mappings":";;;;;;;AAAA;;AAGA,
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/setup-gl.js"],"names":["_global","global","window","glContext","width","height","debug"],"mappings":";;;;;;;AAAA;;AAGA,MAAMA,OAAO,GAAG,OAAOC,MAAP,KAAkB,WAAlB,GAAgCA,MAAhC,GAAyCC,MAAzD;;AAEAF,OAAO,CAACG,SAAR,GACEH,OAAO,CAACG,SAAR,IACA,kCAAkB;AAChBC,EAAAA,KAAK,EAAE,CADS;AAEhBC,EAAAA,MAAM,EAAE,CAFQ;AAGhBC,EAAAA,KAAK,EAAE;AAHS,CAAlB,CAFF;eAaeN,OAAO,CAACG,S","sourcesContent":["import {createTestContext} from '@luma.gl/test-utils';\n\n/* global window, global*/\nconst _global = typeof global !== 'undefined' ? global : window;\n\n_global.glContext =\n _global.glContext ||\n createTestContext({\n width: 1,\n height: 1,\n debug: true\n // throwOnFailure: false,\n // throwOnError: false\n });\n// // TODO - Seems to be an issue in luma.gl\n// (createContext && createContext(100, 100, {}));\n// // console.log('Context', _global.glContext);\n\nexport default _global.glContext;\n"],"file":"setup-gl.js"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@deck.gl/test-utils",
|
|
3
3
|
"description": "Test utilities for deck.gl layers",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "8.6.
|
|
5
|
+
"version": "8.6.4",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"@probe.gl/test-utils": "^3.4.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "750695c9f13595fa01982d81cdc2eb11bb5593b7"
|
|
33
33
|
}
|