-
Notifications
You must be signed in to change notification settings - Fork 71
Description
We have a fully functional unit testing system now! This allows us to write scripts for automatically testing many different features of the website on every commit push or pull request, helping save us time by potentially catching bugs for us, reducing the amount of time we have to spend manually testing, and decreasing the likelihood of breaking bugs reaching production. Let's start enforcing newly added features include their own test, to ensure the project makes progress towards having tests for all.
As of the creation of this Issue, we only have one testing script: 'createAccountController.test.ts', which verifies the Vitest package rejects common profane usernames. We can gradually expand the number of things we test! All testing files should end in '.test.ts', be in the same directory as the feature being tested. All test files will automatically be run when the workflow runs. Tests can be manually run via npm run test, or npm run test:watch to automatically rerun the tests as you are actively modifying them. No one PR has to add tests for the entire project, just adding a test for one feature is acceptable!