Files
MapLibreParticleLab/metrics/integration/expression-tests/index-of/invalid-needle/test.json

25 lines
790 B
JSON

{
"expression": ["index-of", ["get", "needle"], ["get", "haystack"]],
"inputs": [
[{}, {"properties": {"needle": {}, "haystack": [9, 8, 7]}}],
[{}, {"properties": {"needle": {}, "haystack": "helloworld"}}]
],
"expected": {
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "number"
},
"serialized": ["index-of", ["get", "needle"], ["get", "haystack"]],
"outputs": [
{
"error": "Expected first argument to be of type boolean, string, number or null, but found object instead."
},
{
"error": "Expected first argument to be of type boolean, string, number or null, but found object instead."
}
]
}
}