Jest
What is Jest?
Jest is a unit testing library for JavaScript.
(Only in development environment)
Unit testing consists of checking the behavior of the smallest units in your application.
Technically, this would be a class or even a class method in object-oriented languages, and it would be a procedure or function in procedural and functional languages.
Unit testing is the entire application of testing on the input and output signatures of a system.
It consists of validating valid and invalid data via I/O being applied by developers or test analysts.
A unit is the smallest testable part of a computer program.
Creating tests with JEST
If you create your application using the command:
This already includes Jest automatically.
Create a Jest configuration file:
jest.config.js
The name of the test files must end with “.spec.js”.
Ex.: produto.spec.js
https://github.com/ViniciusVC/api_vvc