test(gateway): use lightweight clears in node event setup

This commit is contained in:
Peter Steinberger
2026-02-22 07:44:18 +00:00
parent d9085a7704
commit 4cc975fec1

View File

@@ -90,8 +90,8 @@ function buildCtx(): NodeEventContext {
describe("node exec events", () => {
beforeEach(() => {
enqueueSystemEventMock.mockReset();
requestHeartbeatNowMock.mockReset();
enqueueSystemEventMock.mockClear();
requestHeartbeatNowMock.mockClear();
});
it("enqueues exec.started events", async () => {
@@ -189,8 +189,8 @@ describe("node exec events", () => {
describe("voice transcript events", () => {
beforeEach(() => {
agentCommandMock.mockReset();
updateSessionStoreMock.mockReset();
agentCommandMock.mockClear();
updateSessionStoreMock.mockClear();
agentCommandMock.mockResolvedValue({ status: "ok" } as never);
updateSessionStoreMock.mockImplementation(async (_storePath, update) => {
update({});
@@ -292,9 +292,9 @@ describe("voice transcript events", () => {
describe("agent request events", () => {
beforeEach(() => {
agentCommandMock.mockReset();
updateSessionStoreMock.mockReset();
loadSessionEntryMock.mockReset();
agentCommandMock.mockClear();
updateSessionStoreMock.mockClear();
loadSessionEntryMock.mockClear();
agentCommandMock.mockResolvedValue({ status: "ok" } as never);
updateSessionStoreMock.mockImplementation(async (_storePath, update) => {
update({});