An app automatically generated by @fullstackjs/create-fullstackjs-app module to demostrante some test concepts
First you'll need to create an account at smtp.mailtrap.io and get your credentials.
Then you can create your env file:
cp .env.example .env
and fill MAIL_USERNAME
and MAIL_PASSWORD
with your mailtrap credentials.
After that you can build the server:
make build-server
Then you can try to create a new user
curl --location --request POST 'http://localhost:9000/api/v1/auth/register' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Name Example",
"email": "[email protected]",
"password": "password"
}'
make test
auth-app
└───__mocks__
└───__tests__
└───functional
└───integration
└───unit
└───utils
└───coverage
Where in:
mocks you will have the mock to mail service, so unit tests will not call the real mail package
unit you will have unit tests, working with mocks and stubs
integration you will have integration tests calling the database and other calling the API
functional you will have the functional tests using supertest
coverage you will have the coverage report genereated by jest
You can run the mutation tests using:
make mutation
And then access the Dashboard Report
This project is being analyzed by SonarCloud