Files
MapLibreParticleLab/metrics/integration/expression-tests/index-of/invalid-haystack/test.json
2023-05-09 00:16:58 +02:00

28 lines
932 B
JSON

{
"expression": ["index-of", ["get", "needle"], ["get", "haystack"]],
"inputs": [
[{}, {"properties": {"needle": 1, "haystack": 123}}],
[{}, {"properties": {"needle": "foo", "haystack": {}}}],
[{}, {"properties": {"needle": "foo", "haystack": null}}]
],
"expected": {
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "number"
},
"serialized": ["index-of", ["get", "needle"], ["get", "haystack"]],
"outputs": [
{
"error": "Expected second argument to be of type array or string, but found number instead."
},
{
"error": "Expected second argument to be of type array or string, but found object instead."
},
{
"error": "Expected second argument to be of type array or string, but found null instead."
}
]
}
}