mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 18:24:47 +00:00
test: guard browser service mock calls
This commit is contained in:
@@ -30,7 +30,11 @@ describe("createBrowserPluginService", () => {
|
||||
});
|
||||
|
||||
function getStartParams(): StartLazyPluginServiceModuleParamsWithValidator {
|
||||
const params = runtimeMocks.startLazyPluginServiceModule.mock.calls[0]?.[0];
|
||||
const [call] = runtimeMocks.startLazyPluginServiceModule.mock.calls;
|
||||
if (!call) {
|
||||
throw new Error("expected browser plugin service lazy loader call");
|
||||
}
|
||||
const [params] = call;
|
||||
if (!params?.validateOverrideSpecifier) {
|
||||
throw new Error("expected browser plugin service to pass validateOverrideSpecifier");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user