28 lines
932 B
JSON
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."
|
|
}
|
|
]
|
|
}
|
|
} |