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.
- Express
- Specmatic
- Jest
- Install NodeJS
- Install JRE 17 or later.
To install all necessary dependencies for this project, navigate to the project's root directory in your terminal and execute
npm install
Executing this command will initiate Specmatic and execute the tests on the Nodejs(Express) application.
npm run test