You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A GeoJSON GeometryCollection contains a "geometries" member with an array of GeoJSON geometry objects.
This matcher uses the toBeGeometryCollection functionality to verify the input is a properly formatted GeometryCollection object, and then determine if it has less than or equal to the MaxCount value. It will throw an error for any of the other geometry types as it is a trivial comparison on those.
Omitting MaxCount will assume a maximum value of 1. Passing a number less than 0 will throw an error. Decimals will get truncated.
Description
A GeoJSON GeometryCollection contains a "geometries" member with an array of GeoJSON geometry objects.
This matcher uses the toBeGeometryCollection functionality to verify the input is a properly formatted GeometryCollection object, and then determine if it has less than or equal to the
MaxCount
value. It will throw an error for any of the other geometry types as it is a trivial comparison on those.Omitting
MaxCount
will assume a maximum value of 1. Passing a number less than 0 will throw an error. Decimals will get truncated.Example Matcher Usage
Passing Tests
Good GeometryCollection
Failing Tests
Invalid Inputs To Matcher
Rejects each of the following:
undefined
,null
,false
,true
,0
,NaN
{ someProp: 'I am not GeoJSON', id: 4 }
{}
''
,'Random Feature',
Valid GeometryCollection With Bad MinCount
MinCount
as each of the values in "Invalid Inputs To Matcher" except 0Valid GeometryCollection With Out of Range MinCount
The text was updated successfully, but these errors were encountered: