Skip to content

Commit df071cb

Browse files
committed
fix(test): address lint issues in regression test
- Use template literal instead of string concatenation - Add braces to type guard if-statement
1 parent 0178534 commit df071cb

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/cron/service.failure-alert.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ describe("CronService failure alerts", () => {
594594
const store = await makeStorePath();
595595
const sendCronFailureAlert = vi.fn(async () => undefined);
596596
// 209 code units: emoji (surrogate pair) at positions 199-200 straddles the 200-unit boundary
597-
const longError = "x".repeat(199) + "🎉" + "trailing";
597+
const longError = `${"x".repeat(199)}🎉trailing`;
598598
const runIsolatedAgentJob = vi.fn(async () => ({
599599
status: "error" as const,
600600
error: longError,
@@ -622,7 +622,9 @@ describe("CronService failure alerts", () => {
622622
expect(sendCronFailureAlert).toHaveBeenCalledTimes(1);
623623
const alertText = alertCallArg(sendCronFailureAlert).text;
624624
expect(typeof alertText).toBe("string");
625-
if (typeof alertText !== "string") throw new Error("expected failure alert text");
625+
if (typeof alertText !== "string") {
626+
throw new Error("expected failure alert text");
627+
}
626628

627629
// Verify no dangling surrogates in the truncated error text.
628630
// Must check every character including the last: a dangling high surrogate

0 commit comments

Comments
 (0)