TomasJani / bridge-builder

MIT License
0 stars 0 forks source link

Setup tests and added some for project route #34

Closed mcaniga closed 4 years ago

mcaniga commented 4 years ago

Setup environment for api testing. Added basic tests for project route. Added one test for change, user, work to see if it works. Added test ormconfig in api/tests/misc/testConnection.ts (tweak this if you can't connect to test DB).

Tests are running in their own DB (and DB is cleaned after each test, and loaded with dummy data again) so feel free to play around.

To run tests type npm test or npm run test Tests are done using Jest framework: https://jestjs.io/

NOTE: During tests, auth is off. So any tests expecting 401 or 403 won't work.