@@ -669,11 +669,9 @@ describe("loginGeminiCliOAuth", () => {
|
669 | 669 | return { result, authUrl }; |
670 | 670 | } |
671 | 671 | |
672 | | -async function runRemoteLoginExpectingProjectId( |
673 | | -loginGeminiCliOAuth: LoginGeminiCliOAuthFn, |
674 | | -projectId: string, |
675 | | -) { |
676 | | -const { result } = await runRemoteLoginWithCapturedAuthUrl(loginGeminiCliOAuth); |
| 672 | +async function runProjectDiscoveryExpectingProjectId(projectId: string) { |
| 673 | +const { resolveGoogleOAuthIdentity } = await import("./oauth.project.js"); |
| 674 | +const result = await resolveGoogleOAuthIdentity("access-token"); |
677 | 675 | expect(result.projectId).toBe(projectId); |
678 | 676 | } |
679 | 677 | |
@@ -730,8 +728,7 @@ describe("loginGeminiCliOAuth", () => {
|
730 | 728 | return undefined; |
731 | 729 | }); |
732 | 730 | |
733 | | -const { loginGeminiCliOAuth } = await import("./oauth.js"); |
734 | | -await runRemoteLoginExpectingProjectId(loginGeminiCliOAuth, "daily-project"); |
| 731 | +await runProjectDiscoveryExpectingProjectId("daily-project"); |
735 | 732 | const loadRequests = requests.filter((request) => |
736 | 733 | request.url.includes("v1internal:loadCodeAssist"), |
737 | 734 | ); |
@@ -805,8 +802,7 @@ describe("loginGeminiCliOAuth", () => {
|
805 | 802 | return undefined; |
806 | 803 | }); |
807 | 804 | |
808 | | -const { loginGeminiCliOAuth } = await import("./oauth.js"); |
809 | | -await runRemoteLoginExpectingProjectId(loginGeminiCliOAuth, "env-project"); |
| 805 | +await runProjectDiscoveryExpectingProjectId("env-project"); |
810 | 806 | expect(requests.filter(({ url }) => url.includes("v1internal:loadCodeAssist"))).toHaveLength(3); |
811 | 807 | expect(requests.some(({ url }) => url.includes("v1internal:onboardUser"))).toBe(false); |
812 | 808 | }); |
|