Repository navigation
test: cover untested emailDraftSchema and eventDraftSchema branches - #39
Merged
jerelvelarde merged 1 commit intoSep 24, 2026
Merged
Conversation
emailDraftSchema's multi-line subject rejection and its cc/bcc/attachmentIds length limits had no coverage, and eventDraftSchema's requirement that timed events carry an explicit UTC offset was only exercised incidentally. Add direct tests for these branches plus the schemas' defaults.
Contributor
Author
|
Refs #40 — adds the test coverage discussed there, no production code changes. |
Collaborator
|
Security review — no issues found (reviewed head
CI hasn't run on this PR yet. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title:
test: cover untested emailDraftSchema and eventDraftSchema branches
Description:
Problem
packages/domain/src/index.tshas two schemas guarding what can be sent to Google (emailDraftSchema,eventDraftSchema), but a few of their validation branches had no direct test coverage:emailDraftSchema's rejection of multi-line subjects, and itscc/bcc/attachmentIdslength limits, had zero tests anywhere in the suite.eventDraftSchema's requirement that timed (non-allDay) events carry an explicit UTC offset was only exercised incidentally by an unrelated all-day/timed mismatch test, not directly.Change
Added
tests/domain.test.tswith focusednode:testcases for:cc/bcc/attachmentIdsdefault to[])\n/\rZand numeric offset)calendarId/location/descriptionproposalSchemadiscriminating onkindand validating nested dataNo production code changed — test-only.
Testing
pnpm lint— clean on the new file (ranbiome checkagainsttests/domain.test.tsdirectly; the full-repopnpm lintreports pre-existing CRLF diffs across the whole tree from my local Windows checkout, unrelated to this change)pnpm typecheck— cleanpnpm test— 166 tests, 165 pass; the one failure (computer-runner.test.ts, a Docker subprocess test) is a known Windows-only issue unrelated to this change (also called out in PR fix: handle Postgres pool errors instead of crashing #19)