Skip to content

Commit a726b12

Browse files
committed
tests: "rejected promise … waiting for browser login"
Problem: rejected promise not handled within 1 second: Error: Timed-out waiting for browser login flow to complete at poll (…/src/auth/sso/ssoAccessTokenProvider.ts:251:15) at async SsoAccessTokenProvider.authorize (…/src/auth/sso/ssoAccessTokenProvider.ts:188:23) at async SsoAccessTokenProvider.runFlow (…/src/auth/sso/ssoAccessTokenProvider.ts:113:20) at async SsoAccessTokenProvider.createToken (…/src/auth/sso/ssoAccessTokenProvider.ts:102:24) Solution: Don't know how to fix this. The chain of calls appears correctly await'd. And the ToolkitError correctly "bubbles up" when testing that codepath interactively.
1 parent 1f96b5d commit a726b12

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/credentials/sso/ssoAccessTokenProvider.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,13 @@ describe('SsoAccessTokenProvider', function () {
237237
})
238238

239239
it('respects the device authorization expiration time', async function () {
240+
// XXX: Don't know how to fix this "unhandled rejection" caused by this test:
241+
// rejected promise not handled within 1 second: Error: Timed-out waiting for browser login flow to complete
242+
// at poll (…/src/auth/sso/ssoAccessTokenProvider.ts:251:15)
243+
// at async SsoAccessTokenProvider.authorize (…/src/auth/sso/ssoAccessTokenProvider.ts:188:23)
244+
// at async SsoAccessTokenProvider.runFlow (…/src/auth/sso/ssoAccessTokenProvider.ts:113:20)
245+
// at async SsoAccessTokenProvider.createToken (…/src/auth/sso/ssoAccessTokenProvider.ts:102:24)
246+
240247
setupFlow()
241248
stubOpen()
242249
const exception = new AuthorizationPendingException({ message: '', $metadata: {} })

0 commit comments

Comments
 (0)