mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 23:58:25 +00:00
test: use real SubsystemLogger in directive-tags test
This commit is contained in:
@@ -3,6 +3,7 @@ import os from "node:os";
|
|||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import { CURRENT_SESSION_VERSION } from "@mariozechner/pi-coding-agent";
|
import { CURRENT_SESSION_VERSION } from "@mariozechner/pi-coding-agent";
|
||||||
import { describe, expect, it, vi } from "vitest";
|
import { describe, expect, it, vi } from "vitest";
|
||||||
|
import { createSubsystemLogger } from "../../logging/subsystem.js";
|
||||||
import type { GatewayRequestContext } from "./types.js";
|
import type { GatewayRequestContext } from "./types.js";
|
||||||
|
|
||||||
const mockState = vi.hoisted(() => ({
|
const mockState = vi.hoisted(() => ({
|
||||||
@@ -108,10 +109,7 @@ function createChatContext(): Pick<
|
|||||||
removeChatRun: vi.fn(),
|
removeChatRun: vi.fn(),
|
||||||
dedupe: new Map(),
|
dedupe: new Map(),
|
||||||
registerToolEventRecipient: vi.fn(),
|
registerToolEventRecipient: vi.fn(),
|
||||||
logGateway: {
|
logGateway: createSubsystemLogger("gateway/server-methods/chat.directive-tags.test"),
|
||||||
warn: vi.fn(),
|
|
||||||
debug: vi.fn(),
|
|
||||||
} as GatewayRequestContext["logGateway"],
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user