test(perf): trim fixed waits in relay and startup tests

This commit is contained in:
Peter Steinberger
2026-03-02 17:30:22 +00:00
parent 310dd24ce3
commit 34ff873a7e
5 changed files with 22 additions and 29 deletions

View File

@@ -115,16 +115,15 @@ describe("linePlugin gateway.startAccount", () => {
}),
);
// Allow async internals (probeLineBot await) to flush
await new Promise((r) => setTimeout(r, 20));
expect(monitorLineProvider).toHaveBeenCalledWith(
expect.objectContaining({
channelAccessToken: "token",
channelSecret: "secret",
accountId: "default",
}),
);
await vi.waitFor(() => {
expect(monitorLineProvider).toHaveBeenCalledWith(
expect.objectContaining({
channelAccessToken: "token",
channelSecret: "secret",
accountId: "default",
}),
);
});
abort.abort();
await task;