test: dedupe api key mock read

This commit is contained in:
Peter Steinberger
2026-05-13 01:20:16 +01:00
parent 5f5a0cf916
commit 48eb4e39b2

View File

@@ -191,7 +191,7 @@ describe("resolveNonInteractiveApiKey", () => {
expect(result).toEqual({ key: "custom-profile-key", source: "profile" });
expect(resolveApiKeyForProfile).toHaveBeenCalledOnce();
const [profileParams] = resolveApiKeyForProfile.mock.calls.at(0) ?? [];
const [profileParams] = resolveApiKeyForProfile.mock.calls[0] ?? [];
expect(profileParams?.profileId).toBe("custom-models-custom-local:default");
});
});