@@ -103,13 +103,14 @@ describe('AuthUtil', async function () {
103103
104104 it ( 'returns IDC forms when using IDC without SSO account access' , async function ( ) {
105105 const session = ( auth as any ) . session
106- session && sinon . stub ( session , 'getProfile' ) . resolves ( {
107- ssoSession : {
108- settings : {
109- sso_registration_scopes : [ 'codewhisperer:*' ] ,
106+ session &&
107+ sinon . stub ( session , 'getProfile' ) . resolves ( {
108+ ssoSession : {
109+ settings : {
110+ sso_registration_scopes : [ 'codewhisperer:*' ] ,
111+ } ,
110112 } ,
111- } ,
112- } )
113+ } )
113114
114115 await auth . login_sso ( 'https://example.awsapps.com/start' , 'us-east-1' )
115116 const forms = await auth . getAuthFormIds ( )
@@ -120,13 +121,14 @@ describe('AuthUtil', async function () {
120121 await auth . login_sso ( 'https://example.awsapps.com/start' , 'us-east-1' )
121122 const session = ( auth as any ) . session
122123
123- session && sinon . stub ( session , 'getProfile' ) . resolves ( {
124- ssoSession : {
125- settings : {
126- sso_registration_scopes : [ 'codewhisperer:*' , 'sso:account:access' ] ,
124+ session &&
125+ sinon . stub ( session , 'getProfile' ) . resolves ( {
126+ ssoSession : {
127+ settings : {
128+ sso_registration_scopes : [ 'codewhisperer:*' , 'sso:account:access' ] ,
129+ } ,
127130 } ,
128- } ,
129- } )
131+ } )
130132
131133 const forms = await auth . getAuthFormIds ( )
132134 assert . deepStrictEqual ( forms . sort ( ) , [ 'identityCenterCodeWhisperer' , 'identityCenterExplorer' ] . sort ( ) )
@@ -198,7 +200,7 @@ describe('AuthUtil', async function () {
198200 it ( 'deletes bearer token when disconnected' , async function ( ) {
199201 await ( auth as any ) . stateChangeHandler ( { state : 'notConnected' } )
200202
201- if ( auth . isSsoSession ( auth . session ) ) {
203+ if ( auth . isSsoSession ( auth . session ) ) {
202204 assert . ok ( mockLspAuth . deleteBearerToken . called )
203205 }
204206 } )
@@ -290,14 +292,14 @@ describe('AuthUtil', async function () {
290292 memento . get . returns ( { profile1 : validProfile } )
291293 mockLspAuth . getSsoToken . rejects ( new Error ( 'Token check failed' ) )
292294
293- if ( ! ( auth as any ) . session ) {
295+ if ( ! ( auth as any ) . session ) {
294296 auth . session = new auth2 . SsoLogin ( auth . profileName , auth . lspAuth , auth . eventEmitter )
295297 }
296- const updateProfileStub_3 = sinon . stub ( ( auth as any ) . session , 'updateProfile' ) . resolves ( )
298+ const updateProfileStubNext = sinon . stub ( ( auth as any ) . session , 'updateProfile' ) . resolves ( )
297299
298300 await auth . migrateSsoConnectionToLsp ( 'test-client' )
299301
300- assert . ok ( updateProfileStub_3 . calledOnce )
302+ assert . ok ( updateProfileStubNext . calledOnce )
301303 assert . ok ( memento . update . calledWith ( 'auth.profiles' , undefined ) )
302304 } )
303305
@@ -360,17 +362,17 @@ describe('AuthUtil', async function () {
360362 }
361363 memento . get . returns ( mockProfiles )
362364
363- if ( ! ( auth as any ) . session ) {
365+ if ( ! ( auth as any ) . session ) {
364366 auth . session = new auth2 . SsoLogin ( auth . profileName , auth . lspAuth , auth . eventEmitter )
365367 }
366368
367- const updateProfileStub_2 = sinon . stub ( ( auth as any ) . session , 'updateProfile' ) . resolves ( )
369+ const updateProfileStubMore = sinon . stub ( ( auth as any ) . session , 'updateProfile' ) . resolves ( )
368370
369371 await auth . migrateSsoConnectionToLsp ( 'test-client' )
370372
371- assert . ok ( updateProfileStub_2 . calledOnce )
373+ assert . ok ( updateProfileStubMore . calledOnce )
372374 assert . ok ( memento . update . calledWith ( 'auth.profiles' , undefined ) )
373- assert . deepStrictEqual ( updateProfileStub_2 . firstCall . args [ 0 ] , {
375+ assert . deepStrictEqual ( updateProfileStubMore . firstCall . args [ 0 ] , {
374376 startUrl : validProfile . startUrl ,
375377 region : validProfile . ssoRegion ,
376378 scopes : validProfile . scopes ,
@@ -389,7 +391,7 @@ describe('AuthUtil', async function () {
389391 }
390392 memento . get . returns ( mockProfiles )
391393
392- if ( ! ( auth as any ) . session ) {
394+ if ( ! ( auth as any ) . session ) {
393395 auth . session = new auth2 . SsoLogin ( auth . profileName , auth . lspAuth , auth . eventEmitter )
394396 }
395397
@@ -406,4 +408,4 @@ describe('AuthUtil', async function () {
406408 )
407409 } )
408410 } )
409- } )
411+ } )
0 commit comments