

















@@ -25,16 +25,17 @@ describe("matrix resolver adapter", () => {
2525runtime: createNonExitingRuntimeEnv(),
2626});
272728-expect(resolveMatrixTargetsMock).toHaveBeenCalledWith({
28+expect(resolveMatrixTargetsMock).toHaveBeenCalledTimes(1);
29+const forwarded = resolveMatrixTargetsMock.mock.calls[0]?.[0];
30+expect(forwarded).toEqual({
2931cfg: { channels: { matrix: {} } },
3032accountId: "ops",
3133inputs: ["Alice"],
3234kind: "user",
33-runtime: expect.objectContaining({
34-log: expect.any(Function),
35-error: expect.any(Function),
36-exit: expect.any(Function),
37-}),
35+runtime: forwarded?.runtime,
3836});
37+expect(forwarded?.runtime.log).toBeTypeOf("function");
38+expect(forwarded?.runtime.error).toBeTypeOf("function");
39+expect(forwarded?.runtime.exit).toBeTypeOf("function");
3940});
4041});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。