flow
flow method is used to uniquely identify actual behavior of the application during contract testing. This method extends spec object and has all the request and response validation methods.
js
flow(flow-name)
Usage
โ Correct Usage
js
await flow('get a user')
.get('/api/users/1')
.expectStatus(200);
Arguments
> flow-name (string)
Unique name for the flow.
Examples
Normal
js
const { flow } = require('pactum');
await flow('get a user')
.get('https://reqres.in/api/users/1')
.expectStatus(200);