-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from pactumjs/fix-empty-api-pages
Fix empty api pages
- Loading branch information
Showing
5 changed files
with
209 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,44 @@ | ||
# setReporterAutoRun | ||
--- | ||
tags: | ||
- reporter autorun | ||
- reporter | ||
--- | ||
# setReporterAutoRun | ||
|
||
sets reporter auto run option. Allows to disable reporter run after spec toss. | ||
|
||
> Defaults to `true` | ||
## Syntax | ||
|
||
```js | ||
setReporterAutoRun(boolean) | ||
``` | ||
|
||
## Usage | ||
|
||
### ✅ Correct Usage | ||
|
||
```js | ||
settings.setReporterAutoRun(false) | ||
``` | ||
|
||
## Arguments | ||
|
||
#### > option (boolean) | ||
|
||
Reporter auto run toggle. | ||
|
||
## Examples | ||
|
||
### Normal | ||
|
||
```js | ||
const { spec, request } = require('pactum'); | ||
|
||
settings.setReporterAutoRun(false); | ||
|
||
await spec() | ||
.get('/api/users/1') | ||
.expectStatus(200); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,50 @@ | ||
# setRequestDefaultRetryCount | ||
--- | ||
tags: | ||
- retry count | ||
- request retry count | ||
--- | ||
|
||
# setRequestDefaultRetryCount | ||
|
||
sets default retry count for requests. | ||
|
||
> Defaults to retry count 1 | ||
## Syntax | ||
|
||
```js | ||
setRequestDefaultRetryCount(count) | ||
``` | ||
|
||
## Usage | ||
|
||
### ✅ Correct Usage | ||
|
||
```js | ||
settings.setRequestDefaultRetryCount(2) | ||
``` | ||
|
||
## Arguments | ||
|
||
#### > count (number) | ||
|
||
retry count. | ||
|
||
## Examples | ||
|
||
### Normal | ||
|
||
```js | ||
const { spec, settings } = require('pactum'); | ||
|
||
settings.setRequestDefaultRetryCount(2); | ||
|
||
await spec() | ||
.get('https://randomuser.me/api') | ||
.expectStatus(200); | ||
``` | ||
|
||
## See Also | ||
|
||
- [retry](/api/requests/retry) | ||
- [setRequestDefaultRetryDelay](/api/settings/setRequestDefaultRetryDelay) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,64 @@ | ||
# setRequestDefaultRetryDelay | ||
--- | ||
tags: | ||
- retry delay | ||
- request retry delay | ||
--- | ||
|
||
# setRequestDefaultRetryDelay | ||
|
||
sets default retry delay for requests with retry enabled. | ||
|
||
> Defaults to 1000 milliseconds | ||
## Syntax | ||
|
||
```js | ||
setRequestDefaultRetryDelay(milliseconds) | ||
``` | ||
|
||
## Usage | ||
|
||
### ✅ Correct Usage | ||
|
||
```js | ||
settings.setRequestDefaultRetryDelay(3000) | ||
``` | ||
|
||
## Arguments | ||
|
||
#### > milliseconds (number) | ||
|
||
delay in milliseconds. | ||
|
||
## Examples | ||
|
||
### Normal | ||
|
||
```js | ||
const { spec, settings } = require('pactum'); | ||
|
||
settings.setRequestDefaultRetryCount(2); | ||
settings.setRequestDefaultRetryDelay(2000); | ||
|
||
await spec() | ||
.get('https://randomuser.me/api') | ||
.expectStatus(200); | ||
``` | ||
|
||
|
||
With retry | ||
```js | ||
const { spec, settings } = require('pactum'); | ||
|
||
settings.setRequestDefaultRetryDelay(2000); | ||
|
||
await spec() | ||
.get('https://randomuser.me/api') | ||
.retry(2) | ||
.expectStatus(200); | ||
``` | ||
|
||
## See Also | ||
|
||
- [retry](/api/requests/retry) | ||
- [setRequestDefaultRetryCount](/api/settings/setRequestDefaultRetryCount) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,50 @@ | ||
# setSnapshotDirectoryPath | ||
--- | ||
tags: | ||
- snapshot directory path | ||
- snapshot | ||
--- | ||
# setSnapshotDirectoryPath | ||
|
||
sets snapshots directory path. | ||
|
||
> Defaults to `.pactum/snapshots` path | ||
## Syntax | ||
|
||
```js | ||
setSnapshotDirectoryPath(path) | ||
``` | ||
|
||
## Usage | ||
|
||
### ✅ Correct Usage | ||
|
||
```js | ||
settings.setSnapshotDirectoryPath('new/path') | ||
``` | ||
|
||
## Arguments | ||
|
||
#### > path (string) | ||
|
||
Snapshot directory path url. | ||
|
||
## Examples | ||
|
||
### Normal | ||
|
||
```js | ||
const { spec, request } = require('pactum'); | ||
|
||
settings.setSnapshotDirectoryPath('new/path'); | ||
|
||
await spec() | ||
.name('snapshot directory test') | ||
.get('/api/users/1') | ||
.expectStatus(200) | ||
.expectJsonSnapshot(); | ||
``` | ||
|
||
## See Also | ||
|
||
- [expectJsonSnapshot](/api/assertions/expectJsonSnapshot) |