Skip to content

test(reminders): Live trigger-type coverage for LiveReminderScheduler (#319) - #339

Merged
wei18 merged 1 commit into
mainfrom
test/reminders-live-trigger-coverage-319
Jun 4, 2026
Merged

wei18 merged 1 commit into
mainfrom
test/reminders-live-trigger-coverage-319

Conversation

@wei18

@wei18 wei18 commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Closes #319. From #287 CR nit N1.

Covers the contract-bearing schedule → UNNotificationTrigger mapping that was private + untested.

  • Extract the pure switch into LiveReminderScheduler.trigger(for:) — a static, self-free, internal seam; instance makeTrigger delegates. Behavior unchanged.
  • New LiveTriggerMappingTests (swift-testing): .dailyAt→repeating UNCalendarNotificationTrigger, .after→UNTimeIntervalNotificationTrigger, .onDate→one-shot.

CR: APPROVE-WITH-NITS — behavior-preservation verified byte-identical; assertions non-vacuous. Leader inline-applied the one Low nit (try? #require → try #require + non-optional access, 3 tests marked throws). 4 tests green post-fix.

🤖 Generated with Claude Code

Cover the contract-bearing schedule → UNNotificationTrigger mapping that was
private + untested (Live tests otherwise need the system center). Refs #319,
#287 (CR nit N1).

- Extract the pure switch into `LiveReminderScheduler.trigger(for:)` — a
  `static`, self-free, `internal` seam. The instance `makeTrigger(_:)` now
  delegates to it; runtime behavior is unchanged.
- New `LiveTriggerMappingTests` (swift-testing, `@testable import Reminders`)
  assert each case maps to the right trigger subtype + key params:
  .dailyAt → repeating UNCalendarNotificationTrigger (hour/minute, no day/month);
  .after → non-repeating UNTimeIntervalNotificationTrigger (timeInterval);
  .onDate → one-shot UNCalendarNotificationTrigger (date components).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@wei18
wei18 merged commit 962bd32 into main Jun 4, 2026
@wei18
wei18 deleted the test/reminders-live-trigger-coverage-319 branch June 4, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(reminders): Live trigger-type coverage for LiveReminderScheduler (Phase-2)

1 participant