test(core): trim reset usage in gateway and install source specs

This commit is contained in:
Peter Steinberger
2026-02-22 08:25:04 +00:00
parent 6ceadaa41f
commit b014c70292
4 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ import { createSubagentsTool } from "./tools/subagents-tool.js";
describe("openclaw-tools: subagents steer failure", () => {
beforeEach(() => {
resetSubagentRegistryForTests();
callGatewayMock.mockReset();
callGatewayMock.mockClear();
const storePath = path.join(
os.tmpdir(),
`openclaw-subagents-steer-${Date.now()}-${Math.random().toString(16).slice(2)}.json`,

View File

@@ -68,7 +68,7 @@ function createResponse(): {
describe("createHooksRequestHandler timeout status mapping", () => {
beforeEach(() => {
readJsonBodyMock.mockReset();
readJsonBodyMock.mockClear();
});
test("returns 408 for request body timeout", async () => {

View File

@@ -13,7 +13,7 @@ import { startGatewayMemoryBackend } from "./server-startup-memory.js";
describe("startGatewayMemoryBackend", () => {
beforeEach(() => {
getMemorySearchManagerMock.mockReset();
getMemorySearchManagerMock.mockClear();
});
it("skips initialization when memory backend is not qmd", async () => {

View File

@@ -57,7 +57,7 @@ async function runPack(spec: string, cwd: string, timeoutMs = 1000) {
}
beforeEach(() => {
runCommandWithTimeoutMock.mockReset();
runCommandWithTimeoutMock.mockClear();
});
afterEach(async () => {