diff --git a/src/lib/trigger.ts b/src/lib/trigger.ts index ac2779d..0fb4ef5 100644 --- a/src/lib/trigger.ts +++ b/src/lib/trigger.ts @@ -2,7 +2,7 @@ import dayjs from 'dayjs'; const TARGET_DATE_KEY = 'target_date'; const TARGET_SITE_NAME_KEY = 'site_name'; -export const TERMINATION_MINUTES = 4; +export const TERMINATION_MINUTES = 3; const TRIGGER_FUNCTION_NAME = 'setSchedule'; const TRIGGER_DURATION: number = 60 * 2000; // 2分後 diff --git a/src/oneMonthSchedule.ts b/src/oneMonthSchedule.ts index 733653a..82bf856 100644 --- a/src/oneMonthSchedule.ts +++ b/src/oneMonthSchedule.ts @@ -112,6 +112,10 @@ export default class OneMonthSchedule { throw e; } }); - console.info(`${date.format('YYYY年MM月')}分時点のカレンダー作成回数: ${counter.getCreateEventCallCount()}`); + console.info( + `${date.format( + 'YYYY年MM月' + )}分時点のカレンダー作成回数: ${counter.getCreateEventCallCount()}` + ); } } diff --git a/tests/lib/trigger.test.ts b/tests/lib/trigger.test.ts index 3df4fc8..5df6db0 100644 --- a/tests/lib/trigger.test.ts +++ b/tests/lib/trigger.test.ts @@ -14,12 +14,12 @@ afterAll(() => { describe('hasExceededTerminationMinutes', (): void => { it('現在時刻が基準時刻を超えている場合にtrueを返すこと', () => { - const startDate = dayjs('2019-12-09T23:56:00.000Z'); + const startDate = dayjs('2019-12-09T23:57:00.000Z'); const result = Trigger.hasExceededTerminationMinutes(startDate); expect(result).toBeTruthy(); }); it('現在時刻が基準時刻を超えていない場合にfalseを返すこと', () => { - const startDate = dayjs('2019-12-09T23:56:01.000Z'); + const startDate = dayjs('2019-12-09T23:57:01.000Z'); const result = Trigger.hasExceededTerminationMinutes(startDate); expect(result).toBeFalsy(); });