UoaWDCC / uasc-web

Project with the University of Auckland Snowsports Club Website & Booking System. Established in 2023.
https://uasc.co.nz
6 stars 2 forks source link

Neaten endpoint tests draft #602

Closed jeffplays2005 closed 3 months ago

jeffplays2005 commented 3 months ago

Just to check and see if everything will still work.

Created a setupTests.ts file to include most of the generic code that's repeated or unecessary in most of the files for the future.

Also added the setup file to jest.config.server.ts

Removed redundant setup code from routes.test.ts

jeffplays2005 commented 3 months ago

just a comment, this is far from being done, just chucking it here to see if anything goes wrong from GitHub tests(tested fine on my laptop).

github-actions[bot] commented 3 months ago

Visit the preview URL for this PR (updated for commit dd5c0d2):

https://uasc-ceebc--pr602-570-neaten-endpoint-h3f43ur2.web.app

(expires Mon, 22 Jul 2024 02:39:45 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 36296ceaed1d43e92e7d5e81a72a7bd987560bfa

jeffplays2005 commented 3 months ago

Still a bit far from being done, just need to do some editing to individual routes and also figure out if the setup files can be done any better.

All the routes are just a 1 to 1 copy from the original routes.test.ts without any neatening.

jeffplays2005 commented 3 months ago

Testing endpoints:

yarn test-endpoints

Testing other server scripts

yarn test-server