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
Problem: In tests/telemetry-improvements.test.ts, property-based tests using fast-check assert that emitTelemetryUpdate is called during bulk telemetry ingestion. However, the mock for telemetry.service.js replaces bulkIngestTelemetry entirely, so the real service code that calls emitTelemetryUpdate never executes. The mock needs to either:
(a) Use the real bulkIngestTelemetry implementation with mocked dependencies, or
(b) Have the mock's bulkIngestTelemetry explicitly call the mocked emitTelemetryUpdate.
Implementation: Restructure the test so the mocked bulkIngestTelemetry is wired to call emitTelemetryUpdate with the correct payload, or use a spy that wraps the real implementation while intercepting socket calls.
Dependencies:
Depends on None
Acceptance Criteria:
emitTelemetryUpdate is verifiably called during bulk ingest in tests.
Property-based tests with fast-check pass for all generated inputs.
Payload structure validation tests pass.
Testing Requirements:
Run npm test -- tests/telemetry-improvements.test.ts and verify all tests pass.
Run npm test to confirm no regressions.
PR Checklist:
Branch is named conventionally (e.g., fix/issue-XX-telemetry-improvements-mocks).
npm run lint and npm run build pass with zero warnings.
Screenshot of passing Jest terminal logs is attached to the PR.
Domain: Testing
Issue [Bug] Fix
telemetry-improvements.test.tsemitTelemetryUpdatemock assertionsTier: 🟡 Medium
Description:
tests/telemetry-improvements.test.ts, property-based tests using fast-check assert thatemitTelemetryUpdateis called during bulk telemetry ingestion. However, the mock fortelemetry.service.jsreplacesbulkIngestTelemetryentirely, so the real service code that callsemitTelemetryUpdatenever executes. The mock needs to either:(a) Use the real
bulkIngestTelemetryimplementation with mocked dependencies, or(b) Have the mock's
bulkIngestTelemetryexplicitly call the mockedemitTelemetryUpdate.bulkIngestTelemetryis wired to callemitTelemetryUpdatewith the correct payload, or use a spy that wraps the real implementation while intercepting socket calls.Dependencies:
Acceptance Criteria:
emitTelemetryUpdateis verifiably called during bulk ingest in tests.Testing Requirements:
npm test -- tests/telemetry-improvements.test.tsand verify all tests pass.npm testto confirm no regressions.PR Checklist:
fix/issue-XX-telemetry-improvements-mocks).npm run lintandnpm run buildpass with zero warnings.