Files
MapLibreParticleLab/metrics/integration/expression-tests/coalesce/error/test.json
2023-03-25 14:46:49 +01:00

37 lines
906 B
JSON

{
"expression": [
"coalesce",
["number", ["get", "x"]],
["number", ["get", "y"]],
["number", ["get", "z"]]
],
"inputs": [
[{}, {"properties": {"x": 1}}],
[{}, {"properties": {"x": 1, "y": 2, "z": 3}}],
[{}, {"properties": {"y": 2}}],
[{}, {"properties": {"z": 3}}],
[{}, {}]
],
"expected": {
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "number"
},
"outputs": [
1,
1,
{"error": "Expected value to be of type number, but found null instead."},
{"error": "Expected value to be of type number, but found null instead."},
{"error": "Expected value to be of type number, but found null instead."}
],
"serialized": [
"coalesce",
["number", ["get", "x"]],
["number", ["get", "y"]],
["number", ["get", "z"]]
]
}
}