This repository contains the code for an automated testing suite using Jest with SuperTest and AJV for the API hosted in https://serverest.dev/#/. This README will guide you through the project setup and how to use the provided NPM scripts.
Before you get started, make sure you have the following software installed on your machine:
-
Clone this repository to your local machine:
git clone https://github.com/cezarvaz/serve-rest-api-tests.git cd serve-rest-api-tests
-
Install project dependencies:
npm install
In this project, you can use the following NPM scripts to perform various tasks:
You can use ESLint to check and automatically fix coding style issues in your code.
npm run lint
Husky is a tool that enables Git hooks. You need to install it using the following command:
npm run prepare
This will set up Git hooks to run actions like linting and testing before committing or pushing code.
To run all the tests, use the following command:
npm test
This script will execute your test suite and report the results in the terminal.