Skip to content

Commit

Permalink
test: fix watcher unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
liu-zhipeng committed Oct 10, 2023
1 parent 6b71476 commit cf1d14a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
});
});

0 comments on commit cf1d14a

Please sign in to comment.