From cf1d14a7728d6d6af6e511e2467a27786ee1b74f Mon Sep 17 00:00:00 2001 From: Liu <57480598+liu-zhipeng@users.noreply.github.com> Date: Wed, 11 Oct 2023 00:34:51 +0800 Subject: [PATCH] test: fix watcher unit test --- .../agents/watcher/test/operations/validateAndSwitch.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/agents/watcher/test/operations/validateAndSwitch.spec.ts b/packages/agents/watcher/test/operations/validateAndSwitch.spec.ts index 70213faf2d..5ea85761bd 100644 --- a/packages/agents/watcher/test/operations/validateAndSwitch.spec.ts +++ b/packages/agents/watcher/test/operations/validateAndSwitch.spec.ts @@ -31,8 +31,9 @@ describe("Operations:validateAndSwitch", () => { describe("switchAndAlert", () => { it("should switch and alert", async () => { + (ctxMock.adapters.monitor.switch as SinonStub).resolves(); await validateAndSwitchFns.switchAndAlert(requestContext, "reason"); - expect(ctxMock.adapters.watcher.alert).to.be.calledOnce; + expect(ctxMock.adapters.monitor.alert).to.be.calledOnce; }); }); });