test(msteams): add keyed store to file consent runtime stub · openclaw/openclaw@2b4f3e4
steipete
·
2026-06-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import fs from "node:fs"; |
2 | 2 | import os from "node:os"; |
3 | 3 | import path from "node:path"; |
| 4 | +import type { OpenKeyedStoreOptions } from "openclaw/plugin-sdk/plugin-state-runtime"; |
| 5 | +import { createPluginStateKeyedStoreForTests } from "openclaw/plugin-sdk/plugin-state-test-runtime"; |
4 | 6 | import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; |
5 | 7 | import type { PluginRuntime } from "../runtime-api.js"; |
6 | 8 | import { runMSTeamsFileConsentInvokeHandler } from "./file-consent-invoke.js"; |
@@ -45,6 +47,8 @@ function createRuntimeStub(stateDir?: string): PluginRuntime {
|
45 | 47 | }, |
46 | 48 | }, |
47 | 49 | state: { |
| 50 | +openKeyedStore: (options: OpenKeyedStoreOptions) => |
| 51 | +createPluginStateKeyedStoreForTests("msteams", options), |
48 | 52 | resolveStateDir: (env?: NodeJS.ProcessEnv) => { |
49 | 53 | const override = env?.OPENCLAW_STATE_DIR?.trim(); |
50 | 54 | if (override) { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。