/api-test-demo

jest with subprocess api testing

Primary LanguageJavaScript

API Test Runner with Jest

Simple example of having a test script spawn a server and use Jest as an api test runner.

getting started

To install:

npm i

Running the api test

Run:

npm run test

Running the server

Run:

node main.js

To hit the endpoint from yout browser, visit http://localhost:4600/health