mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 18:44:44 +00:00
test: tighten extension auth assertions
This commit is contained in:
@@ -114,9 +114,7 @@ describe("githubCopilotMemoryEmbeddingProviderAdapter", () => {
|
||||
const result = await githubCopilotMemoryEmbeddingProviderAdapter.create(defaultCreateOptions());
|
||||
|
||||
expect(result.provider?.model).toBe("text-embedding-3-small");
|
||||
expect(resolveCopilotApiTokenMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ githubToken: "gh_test_token_123" }),
|
||||
);
|
||||
expect(resolveCopilotApiTokenMock.mock.calls[0]?.[0]?.githubToken).toBe("gh_test_token_123");
|
||||
});
|
||||
|
||||
it("matches embedding-capable models when supported_endpoints is missing or malformed", async () => {
|
||||
@@ -214,12 +212,8 @@ describe("githubCopilotMemoryEmbeddingProviderAdapter", () => {
|
||||
} as never);
|
||||
|
||||
expect(resolveFirstGithubTokenMock).toHaveBeenCalled();
|
||||
expect(resolveCopilotApiTokenMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
env: process.env,
|
||||
githubToken: "gh_remote_token",
|
||||
}),
|
||||
);
|
||||
expect(resolveCopilotApiTokenMock.mock.calls[0]?.[0]?.env).toBe(process.env);
|
||||
expect(resolveCopilotApiTokenMock.mock.calls[0]?.[0]?.githubToken).toBe("gh_remote_token");
|
||||
|
||||
const discoveryCall = fetchWithSsrFGuardMock.mock.calls[0]?.[0] as {
|
||||
init: { headers: Record<string, string> };
|
||||
|
||||
Reference in New Issue
Block a user