Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.15 KB

README.md

File metadata and controls

35 lines (22 loc) · 1.15 KB

Specmatic Sample: Nodejs-Express Order API

This sample project illustrates the implementation of contract-driven development and contract testing within a Nodejs(Express) application. In this context, Specmatic is utilized to function as a client, making calls to API service according to its OpenAPI specification to validate its functionality.

Here is the API's contract/open api spec governing the interaction of the client with the product API.

Tech

  1. Express
  2. Specmatic
  3. Jest

Setup

  1. Install NodeJS
  2. Install JRE 17 or later.

Install Dependencies

To install all necessary dependencies for this project, navigate to the project's root directory in your terminal and execute

npm install

Execute Tests and Validate Contracts with Specmatic

Executing this command will initiate Specmatic and execute the tests on the Nodejs(Express) application.

npm run test