Title: Enforce Automated Testing Before Commits Using Vitest and Husky
Body:
Description:
To prevent accidental breaking of existing features, we need to ensure that all tests are run before code is committed. Currently, there is no mechanism enforcing test execution before commits, which increases the risk of regressions.
Proposed Solution:
- Use Vitest for running all test cases (
pnpm test).
- Use Husky to add a pre-commit hook that runs
pnpm test automatically.
- Fail the commit if any test case fails, preventing broken code from entering the repository.
Acceptance Criteria:
Benefits:
- Prevents accidental breaking changes from being committed.
- Ensures consistent code quality across contributors.
- Encourages running and writing tests regularly.
Title: Enforce Automated Testing Before Commits Using Vitest and Husky
Body:
Description:
To prevent accidental breaking of existing features, we need to ensure that all tests are run before code is committed. Currently, there is no mechanism enforcing test execution before commits, which increases the risk of regressions.
Proposed Solution:
pnpm test).pnpm testautomatically.Acceptance Criteria:
pnpm testruns all Vitest test cases successfully.pnpm testbefore every commit.Benefits: