Skip to content

Commit 0e4f2c5

Browse files
committed
test: dedupe command control mock reads
1 parent df7a71a commit 0e4f2c5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/auto-reply/command-control.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,8 +1013,9 @@ describe("resolveCommandAuthorization", () => {
10131013
commandAuthorized: true,
10141014
});
10151015
expect(warn).toHaveBeenCalledTimes(1);
1016-
expect(String(warn.mock.calls.at(0)?.[0] ?? "")).toContain("Error");
1017-
expect(String(warn.mock.calls.at(0)?.[0] ?? "")).not.toContain("SECRET-TOKEN-123");
1016+
const warning = String(warn.mock.calls[0]?.[0] ?? "");
1017+
expect(warning).toContain("Error");
1018+
expect(warning).not.toContain("SECRET-TOKEN-123");
10181019
} finally {
10191020
warn.mockRestore();
10201021
}

0 commit comments

Comments
 (0)