Files
MapLibreParticleLab/metrics/integration/expression-tests/in/assert-array/test.json
2023-03-25 14:46:49 +01:00

31 lines
723 B
JSON

{
"expression": [
"boolean",
["in", ["get", "i"], ["array", ["get", "arr"]]]
],
"inputs": [
[{}, {"properties": {"i": null, "arr": [9, 8, 7]}}],
[{}, {"properties": {"i": 1, "arr": [9, 8, 7]}}],
[{}, {"properties": {"i": 9, "arr": [9, 8, 7]}}],
[{}, {"properties": {"i": 1, "arr": null}}]
],
"expected": {
"compiled": {
"result": "success",
"isFeatureConstant": false,
"isZoomConstant": true,
"type": "boolean"
},
"outputs": [
false,
false,
true,
{"error":"Expected value to be of type array, but found null instead."}
],
"serialized": [
"boolean",
["in", ["get", "i"], ["array", ["get", "arr"]]]
]
}
}