You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking module has no tests: click, pixel, and stats endpoints are uncovered
Labels / Complexity: testing · Medium Complexity — Medium
Problem
src/tracking/ (3 files, 0 *.spec.ts) implements the click-redirect, email-open pixel, and stats endpoints — including the open-redirect (#53) and unauthenticated-stats (#54) defects. There are no tests for any endpoint, so nothing pins redirect behavior, pixel responses, or stats aggregation before the security fixes land.
The endpoints are HTTP-shaped. Redirects, pixel headers, and stats bodies are best covered with an HTTP-level test (the test/e2e/ harness) rather than unit mocks.
Acceptance criteria
Tests cover the click redirect (valid and rejected targets), the pixel response (headers and body), and stats aggregation.
Tests run in CI via npm test.
The PR reports the module's coverage change (npm run test:cov).
Tracking module has no tests: click, pixel, and stats endpoints are uncovered
Labels / Complexity: testing · Medium Complexity — Medium
Problem
src/tracking/(3 files, 0*.spec.ts) implements the click-redirect, email-open pixel, and stats endpoints — including the open-redirect (#53) and unauthenticated-stats (#54) defects. There are no tests for any endpoint, so nothing pins redirect behavior, pixel responses, or stats aggregation before the security fixes land.Why this is architecturally hard
test/e2e/harness) rather than unit mocks.Acceptance criteria
npm test.npm run test:cov).Out of scope
The security fixes themselves (#53, #54).
Getting started
src/tracking/tracking.controller.ts— the endpointstest/e2e/— the HTTP-level harnessCommands:
npm test,npm run test:cov.Good first files to read:
src/tracking/tracking.controller.ts,test/e2e/analytics-date-range.spec.ts.