Jest Runner Newman
A Jest runner for Postman's Newman CLI tool.
Table of Contents
Purpose
Easily run automated tests for your Postman collections using Newman and Jest.
Install
$ npm install -D jest-runner-newman
# jestnewmanjs moduleexports = displayName: 'newman' testMatch: '<rootDir>/path/to/tests/**.test.js' runner: 'jest-runner-newman'
npx jest -c jest.newman.js
Running tests
jest-runner-newman
runs Newman tests in Node child processes. In addition to
running a Newman test via the newman
module, each test needs to send the
parent process the result of the test run. To make this easier,
jest-runner-newman
exports a separate module to specifically handle that:
# my-collectiontestjs const handleResult = const newman = ; moduleexports = newman
License
MIT