From e346b83860dcd457b5c897cb0ca0a5e029140900 Mon Sep 17 00:00:00 2001 From: acx10 Date: Sun, 4 Jan 2026 23:08:32 -0700 Subject: [PATCH] Add instructions for running Angular frontend tests --- CONTRIBUTING.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eeeb2dc0a..2d66f77ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -197,6 +197,24 @@ curl http://localhost:8080/actuator/health Always run tests before submitting a pull request to ensure your changes don't break existing functionality. +### Frontend Tests (Angular + Vitest) + +Booklore uses [Vitest](https://vitest.dev/) for fast, modern frontend testing in the Angular app. + +```bash +cd booklore-ui + +# Run all frontend tests +ng test + +# Run tests with coverage report +ng test --coverage +``` + +- The coverage report will be generated in the `coverage/` directory. +- You can open `coverage/index.html` in your browser to view detailed coverage metrics. +- All new features and bug fixes should include relevant unit tests. + ### Backend Tests ```bash