@@ -3094,6 +3094,7 @@ describe("codex manager cli commands", () => {
30943094 } ) ;
30953095 promptLoginModeMock . mockResolvedValueOnce ( { mode : "cancel" } ) ;
30963096 promptAddAnotherAccountMock . mockResolvedValue ( false ) ;
3097+ selectMock . mockResolvedValueOnce ( "browser" ) ;
30973098 promptQuestionMock . mockResolvedValueOnce (
30983099 "http://127.0.0.1:1455/auth/callback?code=oauth-code&state=oauth-state" ,
30993100 ) ;
@@ -3118,7 +3119,6 @@ describe("codex manager cli commands", () => {
31183119 vi . mocked ( browserModule . isBrowserLaunchSuppressed ) . mockReturnValueOnce ( true ) ;
31193120 const serverModule = await import ( "../lib/auth/server.js" ) ;
31203121 const startLocalOAuthServerMock = vi . mocked ( serverModule . startLocalOAuthServer ) ;
3121- startLocalOAuthServerMock . mockRejectedValueOnce ( new Error ( "suppressed browser mode" ) ) ;
31223122
31233123 const { runCodexMultiAuthCli } = await import ( "../lib/codex-manager.js" ) ;
31243124 const exitCode = await runCodexMultiAuthCli ( [ "auth" , "login" ] ) ;
@@ -3166,9 +3166,6 @@ describe("codex manager cli commands", () => {
31663166 const browserModule = await import ( "../lib/auth/browser.js" ) ;
31673167 const openBrowserUrlMock = vi . mocked ( browserModule . openBrowserUrl ) ;
31683168 const serverModule = await import ( "../lib/auth/server.js" ) ;
3169- vi . mocked ( serverModule . startLocalOAuthServer ) . mockRejectedValueOnce (
3170- new Error ( "port in use" ) ,
3171- ) ;
31723169
31733170 const { runCodexMultiAuthCli } = await import ( "../lib/codex-manager.js" ) ;
31743171 const exitCode = await runCodexMultiAuthCli ( [ "auth" , "login" , "--manual" ] ) ;
@@ -3208,9 +3205,6 @@ describe("codex manager cli commands", () => {
32083205 const browserModule = await import ( "../lib/auth/browser.js" ) ;
32093206 const openBrowserUrlMock = vi . mocked ( browserModule . openBrowserUrl ) ;
32103207 const serverModule = await import ( "../lib/auth/server.js" ) ;
3211- vi . mocked ( serverModule . startLocalOAuthServer ) . mockRejectedValueOnce (
3212- new Error ( "port in use" ) ,
3213- ) ;
32143208
32153209 const { runCodexMultiAuthCli } = await import ( "../lib/codex-manager.js" ) ;
32163210 const exitCode = await runCodexMultiAuthCli ( [ "auth" , "login" , "--manual" ] ) ;
@@ -3259,9 +3253,6 @@ describe("codex manager cli commands", () => {
32593253 const browserModule = await import ( "../lib/auth/browser.js" ) ;
32603254 const openBrowserUrlMock = vi . mocked ( browserModule . openBrowserUrl ) ;
32613255 const serverModule = await import ( "../lib/auth/server.js" ) ;
3262- vi . mocked ( serverModule . startLocalOAuthServer ) . mockRejectedValueOnce (
3263- Object . assign ( new Error ( "permission denied" ) , { code : "EACCES" } ) ,
3264- ) ;
32653256
32663257 const { runCodexMultiAuthCli } = await import ( "../lib/codex-manager.js" ) ;
32673258 const exitCode = await runCodexMultiAuthCli ( [ "auth" , "login" , "--manual" ] ) ;
0 commit comments