Skip to content
On this page

Empower Your Test Results with AI-Powered Insights ->

removeDefaultExpectHandlers

Removes all default expect handlers.

Syntax

js
removeDefaultExpectHandlers();

Usage

โœ… Correct Usage

js
response.removeDefaultExpectHandlers();

Examples

Normal

js
const { spec, response } = require('pactum');

response.removeDefaultExpectHandlers();

await spec()
  .get('https://randomuser.me/api')
  .expectStatus(200);

See Also

Released under the MIT License.