refactor(acp): hide test helper internals · openclaw/openclaw@f0acd91
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -53,7 +53,7 @@ export const baseCfg = {
|
53 | 53 | dispatch: { enabled: true }, |
54 | 54 | }, |
55 | 55 | } as const; |
56 | | -export const ORIGINAL_STATE_DIR = process.env.OPENCLAW_STATE_DIR; |
| 56 | +const ORIGINAL_STATE_DIR = process.env.OPENCLAW_STATE_DIR; |
57 | 57 | |
58 | 58 | export async function flushMicrotasks(rounds = 3): Promise<void> { |
59 | 59 | for (let index = 0; index < rounds; index += 1) { |
@@ -108,11 +108,11 @@ export function mockCallArg(
|
108 | 108 | return call[0] as Record<string, unknown>; |
109 | 109 | } |
110 | 110 | |
111 | | -export function mockCallArgs(mock: ReturnType<typeof vi.fn>): Array<Record<string, unknown>> { |
| 111 | +function mockCallArgs(mock: ReturnType<typeof vi.fn>): Array<Record<string, unknown>> { |
112 | 112 | return mock.mock.calls.map((call) => call[0] as Record<string, unknown>); |
113 | 113 | } |
114 | 114 | |
115 | | -export function findMockCallFields( |
| 115 | +function findMockCallFields( |
116 | 116 | mock: ReturnType<typeof vi.fn>, |
117 | 117 | expected: Record<string, unknown>, |
118 | 118 | ) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -140,7 +140,7 @@ export function requireRecord(value: unknown, label: string): Record<string, unk
|
140 | 140 | return value as Record<string, unknown>; |
141 | 141 | } |
142 | 142 | |
143 | | -export function configOptions(value: unknown) { |
| 143 | +function configOptions(value: unknown) { |
144 | 144 | expect(Array.isArray(value), "config options").toBe(true); |
145 | 145 | return value as Array<Record<string, unknown>>; |
146 | 146 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。