Skip to content

Cucumber.js setup for testing API endpoints with Supertest and Open API specs

License

Notifications You must be signed in to change notification settings

philmander/cucumber-api-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cucumber-api-demo

Cucumber.js setup for testing API endpoints with Supertest and Open API specs.

This repo is a proof of comcept.

Install

npm install

Usage

Start the server:

npm start

Then run the tests:

npm test

How it works

  1. Cucumber runs features files.
  2. Step definitons execute, using SuperAgent to send HTTP requests
  3. Response bodies are asserted using Chai against example data defined in the API's Open API spec.

About

Cucumber.js setup for testing API endpoints with Supertest and Open API specs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published