Setting up your testing environment - 0Calories/untitled-block-game-api GitHub Wiki
In order to run the project's test suite, you will first have to create a separate testing database.
- Navigate to the
config
directory in your project - Open
test.env
- Add a new environment variable at the bottom:
DATABASE_URL=postgresql://janedoe:mypassword@localhost:5432/mydb
- Replace the username and password with your credentials, and change
mydb
to what you want to name your testing database. I named mineblockgame_test
. - Run
yarn update-db-test
to generate your local testing database - Run
yarn test
to ensure the tests are working