mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 04:47:03 -06:00
test: guard browser control auth mock calls
This commit is contained in:
@@ -64,7 +64,11 @@ vi.mock("../gateway/auth.js", () => ({
|
||||
}));
|
||||
|
||||
function readPersistedConfig(): OpenClawConfig {
|
||||
const persistedCfg = mocks.writeConfigFile.mock.calls[0]?.[0];
|
||||
const [call] = mocks.writeConfigFile.mock.calls;
|
||||
if (!call) {
|
||||
throw new Error("expected persisted config write");
|
||||
}
|
||||
const [persistedCfg] = call;
|
||||
if (!persistedCfg) {
|
||||
throw new Error("expected persisted config");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user