Papupata Documentation

API Reference

class APIDeclaration

method unmockAll

Purpose

Undoes API mocking

Availability

This functionality is available from papupata version 1.1.0 onwards.

Usage

This function undoes the mocking done by the mock and mockOnce methods for any of the APIs in the declaration.

Parameters

There are no parameters.

Returns

nothing

Examples

import { APIDeclaration } from 'papupata'
const api = new APIDeclaration()
const myAPI = api.declarePostAPI('/do-stuff/:param')
  .response<string>()

myAPI.mock('test')

api.unmockAll()