refactor(browser): remove dead CLI test mocks · openclaw/openclaw@e3bd804
vincentkoc
·
2026-06-18
·
via Recent Commits to openclaw:main
File tree
extensions/browser/src/cli
| Original file line number | Diff line number | Diff line change |
|---|
@@ -43,28 +43,3 @@ export function getBrowserCliRuntimeCapture(): CliRuntimeCapture {
|
43 | 43 | export function getBrowserCliRuntime() { |
44 | 44 | return getBrowserCliRuntimeCapture().defaultRuntime; |
45 | 45 | } |
46 | | - |
47 | | -/** Provides a mock module shape for defaultRuntime imports. */ |
48 | | -export async function mockBrowserCliDefaultRuntime() { |
49 | | -browserCliRuntimeState.capture ??= createCliRuntimeCapture(); |
50 | | -return { defaultRuntime: browserCliRuntimeState.capture.defaultRuntime }; |
51 | | -} |
52 | | - |
53 | | -/** Runs a command action through the same error callback shape as the real helper. */ |
54 | | -export async function runCommandWithRuntimeMock( |
55 | | -_runtime: unknown, |
56 | | -action: () => Promise<void>, |
57 | | -onError: (err: unknown) => void, |
58 | | -) { |
59 | | -return await action().catch(onError); |
60 | | -} |
61 | | - |
62 | | -/** Provides a mock module shape for core runCommandWithRuntime imports. */ |
63 | | -export async function createBrowserCliUtilsMockModule() { |
64 | | -return { runCommandWithRuntime: runCommandWithRuntimeMock }; |
65 | | -} |
66 | | - |
67 | | -/** Provides a mock module shape for Browser CLI runtime imports. */ |
68 | | -export async function createBrowserCliRuntimeMockModule() { |
69 | | -return await mockBrowserCliDefaultRuntime(); |
70 | | -} |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。