Skip to content
On this page

Empower Your Test Results with AI-Powered Insights ->

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);

See Also

Released under the MIT License.