mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-25 16:12:13 +00:00
chore(plugins): drop final dead test any suppressions
This commit is contained in:
@@ -222,7 +222,6 @@ describe("memory plugin e2e", () => {
|
||||
|
||||
try {
|
||||
const { default: memoryPlugin } = await import("./index.js");
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const registeredTools: any[] = [];
|
||||
const mockApi = {
|
||||
id: "memory-lancedb",
|
||||
@@ -246,20 +245,15 @@ describe("memory plugin e2e", () => {
|
||||
error: vi.fn(),
|
||||
debug: vi.fn(),
|
||||
},
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
registerTool: (tool: any, opts: any) => {
|
||||
registeredTools.push({ tool, opts });
|
||||
},
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
registerCli: vi.fn(),
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
registerService: vi.fn(),
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
on: vi.fn(),
|
||||
resolvePath: (p: string) => p,
|
||||
};
|
||||
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
memoryPlugin.register(mockApi as any);
|
||||
const recallTool = registeredTools.find((t) => t.opts?.name === "memory_recall")?.tool;
|
||||
if (!recallTool) {
|
||||
|
||||
@@ -38,13 +38,9 @@ describeLive("memory plugin live tests", () => {
|
||||
const liveApiKey = OPENAI_API_KEY;
|
||||
|
||||
// Mock plugin API
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const registeredTools: any[] = [];
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const registeredClis: any[] = [];
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const registeredServices: any[] = [];
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const registeredHooks: Record<string, any[]> = {};
|
||||
const logs: string[] = [];
|
||||
|
||||
@@ -69,19 +65,15 @@ describeLive("memory plugin live tests", () => {
|
||||
error: (msg: string) => logs.push(`[error] ${msg}`),
|
||||
debug: (msg: string) => logs.push(`[debug] ${msg}`),
|
||||
},
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
registerTool: (tool: any, opts: any) => {
|
||||
registeredTools.push({ tool, opts });
|
||||
},
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
registerCli: (registrar: any, opts: any) => {
|
||||
registeredClis.push({ registrar, opts });
|
||||
},
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
registerService: (service: any) => {
|
||||
registeredServices.push(service);
|
||||
},
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
on: (hookName: string, handler: any) => {
|
||||
if (!registeredHooks[hookName]) {
|
||||
registeredHooks[hookName] = [];
|
||||
@@ -92,7 +84,6 @@ describeLive("memory plugin live tests", () => {
|
||||
};
|
||||
|
||||
// Register plugin
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
memoryPlugin.register(mockApi as any);
|
||||
|
||||
// Check registration
|
||||
|
||||
@@ -49,7 +49,6 @@ function runGroupGating(params: {
|
||||
const baseMentionConfig = buildMentionConfig(params.cfg, undefined);
|
||||
const result = applyGroupGating({
|
||||
cfg: params.cfg,
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
msg: params.msg as any,
|
||||
conversationId,
|
||||
groupHistoryKey: `whatsapp:default:group:${conversationId}`,
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
} from "./pairing-security.test-harness.js";
|
||||
|
||||
// Avoid exporting vitest mock types (TS2742 under pnpm + d.ts emit).
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
type AnyMockFn = any;
|
||||
|
||||
export const DEFAULT_ACCOUNT_ID = "default";
|
||||
|
||||
Reference in New Issue
Block a user