mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-22 03:51:18 +00:00
test: guard browser control auth mock calls
This commit is contained in:
parent
9947c50968
commit
7f8d37bdcc
1 changed files with 5 additions and 1 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue