Overview
src/common/utils/data-anonymization.service.ts has no accompanying *.spec.ts, so its behaviour is unverified and easy to regress. Add focused unit tests covering the service's public methods, including the main success paths and the error/edge cases.
Specifications
Features:
- The service has unit tests covering its public API.
- Both happy-path and failure/edge-case behaviour is asserted.
Tasks:
- Create
src/common/utils/data-anonymization.service.spec.ts with a NestJS Test.createTestingModule setup and mocked dependencies.
- Cover each public method: expected result on success, and error handling on invalid input / dependency failure.
- Ensure the new tests run and pass under the existing Jest config.
Impacted Files:
- src/common/utils/data-anonymization.service.ts
- src/common/utils/data-anonymization.service.spec.ts
Acceptance Criteria
- Every public method of the service has at least one test.
- Success and failure/edge-case paths are both asserted.
- The suite passes in CI.
Overview
src/common/utils/data-anonymization.service.tshas no accompanying*.spec.ts, so its behaviour is unverified and easy to regress. Add focused unit tests covering the service's public methods, including the main success paths and the error/edge cases.Specifications
Features:
Tasks:
src/common/utils/data-anonymization.service.spec.tswith a NestJSTest.createTestingModulesetup and mocked dependencies.Impacted Files:
Acceptance Criteria