
Heimdl and CodeRabbit
CodeRabbit reviews the change, Heimdl checks the tests behind it
Two different questions
CodeRabbit asks
“Does this change look right?”
Heimdl asks
“If this change were wrong, would a test fail?”
Across the 3 pull requests CodeRabbit reviewed, the tests missed 55% of the changes
documenso/documenso #3355Invalid timezone shows an error with no message93changes68caught22survived3uncovered4tests suggestedteam-analytics-range.ts:46survived
- { message: 'Invalid analytics timezone' }+ {}Suggested test, rejects invalid timezones with correct error messageexpect(() =>
resolveTeamAnalyticsRange({ range: '30d', timezone: 'Not/A_Zone', now: new Date('2025-01-15T12:00:00.000Z') }),
).toThrowError(/Invalid analytics timezone/);open-circle/valibot #1523Unknown keys dropped from validation results57changes38caught19survived0uncovered4tests suggestedlooseObject.ts:204survived- !dataset.issues || !config.abortEarly+ !dataset.issues && !config.abortEarlySuggested test, looseObject should include unknown keys when there are issues and abortEarly is falseexpect(result.value).toEqual({ key: 123, extra: 'bar' });triggerdotdev/trigger.dev #4815Session streams fail to start without the session ID179changes42caught27survived110uncovered2tests suggestedapiClient/index.ts:1397uncovered- `${this.baseUrl}/realtime/v1/sessions/${encodeURIComponent(sessionIdOrExternalId)}`+ ``Suggested test, initializes session stream with correct URL containing session IDexpect(url.pathname).toBe(`/realtime/v1/sessions/${encodeURIComponent(sessionId)}/out`);Running both
Keep CodeRabbit for review, add Heimdl for proof your tests hold the change
Heimdl