Skip to content

Commit dd312c3

Browse files
committed
test(approvals): narrow the calendar code before the failing-set lookup
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4czKnDE6hsyXQzB9wB2
1 parent 832f721 commit dd312c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/plugins/plugin-approvals/src/approval-service-sla-calendar-clock.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ function erroringCalendarServiceAt(iso: string, failing: Set<string>) {
418418
clock: { now: () => new Date(nowMs) },
419419
workCalendar: () => ({
420420
async addWorkingHours(scope, start, hours) {
421-
if (scope.calendar !== undefined && failing.has(scope.calendar)) {
421+
if (typeof scope.calendar === 'string' && failing.has(scope.calendar)) {
422422
throw new Error('sys_work_calendar read failed: connection reset');
423423
}
424424
return real.addWorkingHours(scope, start, hours);

0 commit comments

Comments
 (0)