Skip to content

Conversation

@aedwardg
Copy link
Collaborator

@aedwardg aedwardg commented Mar 3, 2025

What issue is this solving?

Closes #54

Description

Add Vitest and React Testing Library.
Configure Vitest and RTL to work with Eslint and Typescript.
Write a few unit tests and React tests for the Home page as examples.
Tests can be run with:

  • npm run test (run all tests once)
  • npm run test path/to/file.test.tsx (run single test once)
  • npm run test:watch (run all tests, and then watch for changes, running tests again after code has changed)

Remaining tests and github workflow to run tests in CI to be added in followup PRs.

Any helpful knowledge/context for the reviewer?

  • Any new dependencies to install? ✔️
  • Any special requirements to test? ✔️ After installing new deps run npm run test or npm run test:watch
  • Any UI changes? Include screenshots if so. ❌

Feelings gif (optional)

What gif best describes your feeling working on this issue?
science experiment

Please make sure you've attempted to meet the following coding standards

  • Code has been tested and does not produce errors
  • Code is readable and formatted
  • There isn't any unnecessary commented-out code

@ashstewart7
Copy link
Member

Sorry for the delay reviewing this - will have a chance to look properly once some coursework is out the way this weekend. Very much not forgotten :)

Copy link
Contributor

@Cykotech Cykotech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aedwardg aedwardg merged commit ed22065 into main Apr 5, 2025
3 checks passed
@aedwardg aedwardg deleted the 54-add-initial-test-suite branch April 5, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add initial test suite

4 participants