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

33 lines
838 B
JSON

{
"propertySpec": {
"type": "array",
"value": "string",
"property-type": "data-driven",
"expression": {"parameters": ["zoom", "feature"]}
},
"expression": ["get", "array"],
"inputs": [
[{}, {"properties": {"array": ["a", "b"]}}],
[{}, {"properties": {"array": [1, 2]}}],
[{}, {"properties": {"array": "not"}}]
],
"expected": {
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "array<string>"
},
"outputs": [
["a", "b"],
{
"error": "Expected value to be of type array<string>, but found array<number, 2> instead."
},
{
"error": "Expected value to be of type array<string>, but found string instead."
}
],
"serialized": ["array", "string", ["get", "array"]]
}
}