mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 20:30:45 +00:00
test(providers): share onboard primary assertions
This commit is contained in:
@@ -43,6 +43,16 @@ export function expectProviderOnboardPrimaryAndFallbacks(params: {
|
||||
]);
|
||||
}
|
||||
|
||||
export function expectProviderOnboardPreservesPrimary(params: {
|
||||
applyProviderConfig: (config: OpenClawConfig) => OpenClawConfig;
|
||||
primaryModelRef: string;
|
||||
}) {
|
||||
const cfg = params.applyProviderConfig({
|
||||
agents: { defaults: { model: { primary: params.primaryModelRef } } },
|
||||
});
|
||||
expect(resolveAgentModelPrimaryValue(cfg.agents?.defaults?.model)).toBe(params.primaryModelRef);
|
||||
}
|
||||
|
||||
export function expectProviderOnboardMergedLegacyConfig(params: {
|
||||
applyProviderConfig: (config: OpenClawConfig) => OpenClawConfig;
|
||||
providerId: string;
|
||||
|
||||
Reference in New Issue
Block a user