e2e-worker-environment.ts 587 B

123456789101112131415161718
  1. const ASK_USER_QUESTION_AUTO_RESOLUTION_SETTING_SPEC =
  2. "conversation-session-ask-user-question-auto-resolution-setting.test.ts";
  3. export function resolveAskUserQuestionClockScaleForWorker({
  4. requestedScale,
  5. specs,
  6. }: {
  7. requestedScale?: string;
  8. specs: readonly string[];
  9. }): string | undefined {
  10. const normalizedRequestedScale = requestedScale?.trim();
  11. if (normalizedRequestedScale) return normalizedRequestedScale;
  12. return specs.some((spec) =>
  13. spec.replaceAll("\\", "/").endsWith(`/${ASK_USER_QUESTION_AUTO_RESOLUTION_SETTING_SPEC}`),
  14. )
  15. ? "20"
  16. : undefined;
  17. }