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
Expects HTTP response to return a JSON collection (can be empty or contain the specified minimum and/or maximum number of items). The `utils.expect.response.many` function can be called via one of these shortcuts:
386
388
387
389
*[`utils.expect.response.empty`](#utilsexpectresponseempty) to check for an empty collection
388
-
*[`utils.expect.response.not.empty`](#utilsexpectresponsenotempty) to check for a non-empty collection
389
390
*[`utils.expect.response.unique`](#utilsexpectresponseunique) to check for a collection with a single (unique) item
391
+
*[`utils.expect.response.not.empty`](#utilsexpectresponsenotempty) to check for a non-empty collection
392
+
*[`utils.expect.response.not.unique`](#utilsexpectresponsenotunique) to check for a collection with multiple items
390
393
391
394
#### Prototype
392
395
```JavaScript
@@ -448,6 +451,20 @@ Check if the HTTP response data contains a JSON collection with at least one ite
448
451
utils.expect.response.not.empty(pm);
449
452
```
450
453
454
+
### `utils.expect.response.not.unique`
455
+
Expects HTTP response to return a JSON collection with at least two items.
456
+
457
+
#### Prototype
458
+
```JavaScript
459
+
utils.expect.response.not.unique(pm)
460
+
```
461
+
462
+
#### Example
463
+
Check if the HTTP response data contains a JSON collection with at least two items.
464
+
```JavaScript
465
+
utils.expect.response.not.unique(pm);
466
+
```
467
+
451
468
## Property validation functions
452
469
Property validation functions check named properties of the specified objects. The primary benefits of these functions (compared to the underlying [Chai assertions](https://www.chaijs.com/api/bdd/) they use) is that they (a) always check to make sure that the properties exist before additional validation (so you can skip one test step) and (b) generate more complete error messages on assertion failures (the default assertion errors do not mention named of the properties being checked, which makes them not that useful). Property validation functions are grouped under the `utils.expect.property` namespace and include:
0 commit comments