This is a project based on a Rocketseat's video about TDD, for the purpose of studying.
You will need a database, docker (or Postgres) installed.
- Install packages
Runyarn
ornpm i
to install all the dependencies needed. - Create .env files
Create your .env file based on the.env.example
. Then, create a .env for the tests named.env.test
with the following data:DB_DIALECT=sqlite
- Initialize the database
Rundocker-compose up
to set up the database. After this, runyarn sequelize db:migrate
.
For the tests, you can run yarn test
or npm t
to run them all. Or, you can use jest
and the name of the file you want to test.
To run the project, you can use yarn start
or npm start
.