Skip to content

Commit bec2136

Browse files
committed
Improved documentation.
1 parent ca23970 commit bec2136

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -252,19 +252,19 @@ Use data validation functions to check data returned by the HTTP response object
252252
## Response validation functions
253253
Response validation functions check the type of data returned in HTTP response. They are grouped under the `utils.expect.response` namespace and include:
254254

255-
* `utils.expect.response.text`:
255+
* [`utils.expect.response.text`](#utilsexpectresponsetext):
256256
Expects HTTP response to return a simple data type, such as string.
257-
* `utils.expect.response.json`:
257+
* [`utils.expect.response.json`](#utilsexpectresponsejson):
258258
Expects HTTP response to return any JSON object.
259-
* `utils.expect.response.one`:
259+
* [`utils.expect.response.one`](#utilsexpectresponseone):
260260
Expects HTTP response to return a single JSON element.
261-
* `utils.expect.response.many`:
261+
* [`utils.expect.response.many`](#utilsexpectresponsemany):
262262
Expects HTTP response to return a JSON collection.
263-
* `utils.expect.response.empty`:
263+
* [`utils.expect.response.empty`](#utilsexpectresponseempty):
264264
Expects HTTP response to return an empty JSON collection.
265-
* `utils.expect.response.nonempty`:
265+
* [`utils.expect.response.nonempty`](#utilsexpectresponsenonempty):
266266
Expects HTTP response to return a non-empty JSON collection.
267-
* `utils.expect.response.unique`:
267+
* [`utils.expect.response.unique`](#utilsexpectresponseunique):
268268
Expects HTTP response to return a JSON collection with a single element.
269269

270270
### utils.expect.response.text
@@ -312,9 +312,9 @@ utils.expect.response.one(pm);
312312
### utils.expect.response.many
313313
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:
314314

315-
* [`utils.expect.response.empty`](#utilsexpectresponseempty)
316-
* [`utils.expect.response.nonempty`](#utilsexpectresponsenonempty)
317-
* [`utils.expect.response.unique`](#utilsexpectresponseunique)
315+
* [`utils.expect.response.empty`](#utilsexpectresponseempty) to check for an empty collection
316+
* [`utils.expect.response.nonempty`](#utilsexpectresponsenonempty) to check for a non-empty collection
317+
* [`utils.expect.response.unique`](#utilsexpectresponseunique) to check for a collection with a single (unique) item
318318

319319
#### Prototype
320320
```JavaScript
@@ -379,13 +379,13 @@ utils.expect.response.unique(pm);
379379
## Property validation functions
380380
Property validation functions check the named property of the specified object. The primary benefits of these functions (compared to the underlying [Chai assertions](https://www.chaijs.com/api/bdd/) they use) is that that they always check to make sure that the property exist before additional validation (so you can skip one test step) and 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:
381381

382-
* `utils.expect.property.exist`:
382+
* [`utils.expect.property.exist`](#utilsexpectpropertyexist):
383383
Expects the specified object to have a property with the given name.
384-
* `utils.expect.property.notexist`:
384+
* [`utils.expect.property.notexist`](#utilsexpectpropertynotexist):
385385
Expects the specified object to not have a property with the given name.
386-
* `utils.expect.property.equal`:
386+
* [`utils.expect.property.equal`](#utilsexpectpropertyequal):
387387
Expects a named property of the specified object to be equal to the specific value.
388-
* `utils.expect.property.notequal`:
388+
* [`utils.expect.property.notequal`](#utilsexpectpropertynotequal):
389389
Expects a named property of the specified object to not be equal to the specific value.
390390

391391
### Parameters
@@ -466,15 +466,15 @@ utils.expect.property.notequal(pm, response, "active", true);
466466
## String validation functions
467467
String validation functions are a subset of property validation functions that focus on string properties. They are grouped under the `utils.expect.property.string` namespace and include:
468468

469-
* `utils.expect.property.string.exact`:
469+
* [`utils.expect.property.string.exact`](#utilsexpectpropertystringexact):
470470
Expects the named object property to be equal to the specified string value.
471-
* `utils.expect.property.string.partial`:
471+
* [`utils.expect.property.string.partial`](#utilsexpectpropertystringpartial):
472472
Expects the named object property to be contain the specified string value.
473-
* `utils.expect.property.string.start`:
473+
* [`utils.expect.property.string.start`](#utilsexpectpropertystringstart):
474474
Expects the named object property to start with the specified string value.
475-
* `utils.expect.property.string.end`:
475+
* [`utils.expect.property.string.end`](#utilsexpectpropertystringend):
476476
Expects the named object property to end with the specified string value.
477-
* `utils.expect.property.string.match`:
477+
* [`utils.expect.property.string.match`](#utilsexpectpropertystringmatch):
478478
Expects the named object property to match the specified regular expression.
479479

480480
### Parameters

0 commit comments

Comments
 (0)