Tests: align extension approval startup seams

This commit is contained in:
Peter Steinberger
2026-04-07 21:55:11 +01:00
parent a80453f2e1
commit 5f5ec841fb

View File

@@ -28,6 +28,24 @@ vi.mock("./probe.js", () => {
};
});
vi.mock("./channel.runtime.js", () => ({
probeZaloAccount: hoisted.probeZalo,
startZaloGatewayAccount: async (ctx: {
account: ResolvedZaloAccount;
abortSignal: AbortSignal;
setStatus: (patch: Partial<ResolvedZaloAccount>) => void;
}) => {
await hoisted.probeZalo();
ctx.setStatus({ accountId: ctx.account.accountId });
return await hoisted.monitorZaloProvider({
token: ctx.account.token,
account: ctx.account,
abortSignal: ctx.abortSignal,
useWebhook: false,
});
},
}));
import { zaloPlugin } from "./channel.js";
function buildAccount(): ResolvedZaloAccount {