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

32 lines
806 B
JSON

{
"expression": {"type": "identity", "property": "p"},
"inputs": [
[{}, {"properties": {}}],
[{}, {"properties": {"p": "0"}}],
[{}, {"properties": {"p": "1"}}],
[{}, {"properties": {"p": 0}}]
],
"propertySpec": {
"type": "string",
"property-type": "data-driven",
"expression": {"interpolated": false, "parameters": ["zoom", "feature"]}
},
"expected": {
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "string"
},
"outputs": [
{"error": "Expected value to be of type string, but found null instead."},
"0",
"1",
{
"error": "Expected value to be of type string, but found number instead."
}
],
"serialized": ["string", ["get", "p"]]
}
}