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.
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
ornpm 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.