mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 13:27:27 +00:00
test(gateway): use lightweight clears in node event setup
This commit is contained in:
@@ -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({});
|
||||
|
||||
Reference in New Issue
Block a user