Skip to content

Commit 15543d8

Browse files
test
Signed-off-by: nkomonen-amazon <[email protected]>
1 parent 77db9cc commit 15543d8

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

packages/core/src/test/setupUtil.ts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -223,22 +223,23 @@ export function registerAuthHook(secret: string, lambdaId = process.env['AUTH_UT
223223

224224
const openStub = patchObject(vscode.env, 'openExternal', async (target) => {
225225
try {
226-
const url = new URL(target.toString(true))
227-
228-
// A `#` was added in to the URL path and broke the parsing, so we need to drop the '#'
229-
// Eg: 'https://nkomonen.awsapps.com/start/#/device?user_code=JXZC-NVRK'
230-
const urlWithoutHash = target.toString(true).replace(/\/\#/, '')
231-
const userCode = new URL(urlWithoutHash).searchParams.get('user_code')
232-
233-
// TODO: Update this to just be the full URL if the authorizer lambda ever
234-
// supports the verification URI with user code embedded (VerificationUriComplete).
235-
const verificationUri = url.origin
236-
237-
await invokeLambda(lambdaId, {
238-
secret,
239-
userCode,
240-
verificationUri,
241-
})
226+
throw new Error(`Auth URL: ${target.toString(true)}`)
227+
// const url = new URL(target.toString(true))
228+
//
229+
// // A `#` was added in to the URL path and broke the parsing, so we need to drop the '#'
230+
// // Eg: 'https://nkomonen.awsapps.com/start/#/device?user_code=JXZC-NVRK'
231+
// const urlWithoutHash = target.toString(true).replace(/\/\#/, '')
232+
// const userCode = new URL(urlWithoutHash).searchParams.get('user_code')
233+
//
234+
// // TODO: Update this to just be the full URL if the authorizer lambda ever
235+
// // supports the verification URI with user code embedded (VerificationUriComplete).
236+
// const verificationUri = url.origin
237+
//
238+
// await invokeLambda(lambdaId, {
239+
// secret,
240+
// userCode,
241+
// verificationUri,
242+
// })
242243
} finally {
243244
openStub.dispose()
244245
}

0 commit comments

Comments
 (0)