24 lines
769 B
JSON
24 lines
769 B
JSON
{
|
|
"expression": ["index-of", ["get", "substr"], ["string", ["get", "str"]]],
|
|
"inputs": [
|
|
[{}, {"properties": {"substr": null, "str": "helloworld"}}],
|
|
[{}, {"properties": {"substr": "foo", "str": "helloworld"}}],
|
|
[{}, {"properties": {"substr": "low", "str": "helloworld"}}],
|
|
[{}, {"properties": {"substr": "low", "str": null}}]
|
|
],
|
|
"expected": {
|
|
"compiled": {
|
|
"result": "success",
|
|
"isFeatureConstant": false,
|
|
"isZoomConstant": true,
|
|
"type": "number"
|
|
},
|
|
"serialized": ["index-of", ["get", "substr"], ["string", ["get", "str"]]],
|
|
"outputs": [
|
|
-1,
|
|
-1,
|
|
3,
|
|
{"error": "Expected value to be of type string, but found null instead."}
|
|
]
|
|
}
|
|
} |