style: normalize indentation to 2 spaces

This commit is contained in:
Peter Steinberger
2025-11-26 00:15:10 +01:00
parent e107f115e2
commit 8a01dc7f4c
2 changed files with 71 additions and 71 deletions

View File

@@ -640,44 +640,44 @@ describe("config and templating", () => {
expect(onReplyStart.mock.calls.length).toBeGreaterThanOrEqual(3);
});
it("uses session typing interval override", async () => {
const onReplyStart = vi.fn();
const runSpy = vi.spyOn(index, "runCommandWithTimeout").mockImplementation(
() =>
new Promise((resolve) =>
setTimeout(
() =>
resolve({
stdout: "done\n",
stderr: "",
code: 0,
signal: null,
killed: false,
}),
120,
),
),
);
const cfg = {
inbound: {
reply: {
mode: "command" as const,
command: ["echo", "{{Body}}"],
session: { typingIntervalSeconds: 0.02 },
},
},
};
it("uses session typing interval override", async () => {
const onReplyStart = vi.fn();
const runSpy = vi.spyOn(index, "runCommandWithTimeout").mockImplementation(
() =>
new Promise((resolve) =>
setTimeout(
() =>
resolve({
stdout: "done\n",
stderr: "",
code: 0,
signal: null,
killed: false,
}),
120,
),
),
);
const cfg = {
inbound: {
reply: {
mode: "command" as const,
command: ["echo", "{{Body}}"],
session: { typingIntervalSeconds: 0.02 },
},
},
};
const promise = index.getReplyFromConfig(
{ Body: "hi", From: "+1", To: "+2" },
{ onReplyStart },
cfg,
runSpy,
);
await new Promise((r) => setTimeout(r, 200));
await promise;
expect(onReplyStart.mock.calls.length).toBeGreaterThanOrEqual(3);
});
const promise = index.getReplyFromConfig(
{ Body: "hi", From: "+1", To: "+2" },
{ onReplyStart },
cfg,
runSpy,
);
await new Promise((r) => setTimeout(r, 200));
await promise;
expect(onReplyStart.mock.calls.length).toBeGreaterThanOrEqual(3);
});
it("injects Claude output format + print flag when configured", async () => {
const runSpy = vi.spyOn(index, "runCommandWithTimeout").mockResolvedValue({