Chai plugin to assert on Postman Collections
Install
$ npm install chai-postman --save-dev
Usage
In order to use this plugin, ensure that you have postman-collection and lodash installed.
var _ = chai = sdk = chaiPostman = req res expect = chaiexpect; chai; // create postman-collection request and response instancesreq = header: key: 'Content-Type' value: 'application/json; charset=utf-8' ;res = code: 200 ; // request assertionstobeapostmanRequest;tohave; // an optional second argument can also be provided to assert value // response assertionstobeapostmanResponse;tohave;
Check the tests for a complete reference.