Skip to content

samycici/auth-app

Repository files navigation

Auth App

Mutation testing badge Quality Gate Status CircleCI

An app automatically generated by @fullstackjs/create-fullstackjs-app module to demostrante some test concepts

You'll need

To run the App

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@gmail.com",
    "password": "password"
}'

To run tests

make test

Test organization

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

Mutation Test

You can run the mutation tests using:

make mutation

And then access the Dashboard Report

Sonar

Sonar Analysis

This project is being analyzed by SonarCloud

Sonar

About

Auth App example with express and node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages