@@ -230,7 +230,7 @@ describe('LanguageClientAuth', () => {
230230
231231 sinon . assert . calledOnce ( client . sendRequest )
232232 sinon . assert . calledWith ( client . sendRequest , invalidateStsCredentialRequestType . method , {
233- profileName : profileName ,
233+ iamCredentialId : profileName ,
234234 } )
235235 sinon . assert . match ( result , { success : true } )
236236 } )
@@ -631,7 +631,6 @@ describe('IamLogin', () => {
631631 let lspAuth : sinon . SinonStubbedInstance < LanguageClientAuth >
632632 let iamLogin : IamLogin
633633 let eventEmitter : vscode . EventEmitter < any >
634- let fireEventSpy : sinon . SinonSpy
635634
636635 const loginOpts = {
637636 accessKey : 'test-access-key' ,
@@ -657,7 +656,6 @@ describe('IamLogin', () => {
657656 beforeEach ( ( ) => {
658657 lspAuth = sinon . createStubInstance ( LanguageClientAuth )
659658 eventEmitter = new vscode . EventEmitter ( )
660- fireEventSpy = sinon . spy ( eventEmitter , 'fire' )
661659 iamLogin = new IamLogin ( profileName , lspAuth as any , eventEmitter )
662660 ; ( iamLogin as any ) . eventEmitter = eventEmitter
663661 ; ( iamLogin as any ) . connectionState = 'notConnected'
@@ -789,33 +787,6 @@ describe('IamLogin', () => {
789787 } )
790788
791789 sinon . assert . match ( iamLogin . getConnectionState ( ) , 'expired' )
792- sinon . assert . calledOnce ( fireEventSpy )
793- sinon . assert . calledWith ( fireEventSpy , {
794- id : profileName ,
795- state : 'expired' ,
796- } )
797- } )
798-
799- it ( 'emits refresh event when credential is refreshed' , ( ) => {
800- ; ( iamLogin as any ) . stsCredentialChangedHandler ( {
801- kind : StsCredentialChangedKind . Refreshed ,
802- stsCredentialId : 'test-credential-id' ,
803- } )
804-
805- sinon . assert . calledOnce ( fireEventSpy )
806- sinon . assert . calledWith ( fireEventSpy , {
807- id : profileName ,
808- state : 'refreshed' ,
809- } )
810- } )
811-
812- it ( 'does not emit event for different credential ID' , ( ) => {
813- ; ( iamLogin as any ) . stsCredentialChangedHandler ( {
814- kind : StsCredentialChangedKind . Refreshed ,
815- stsCredentialId : 'different-credential-id' ,
816- } )
817-
818- sinon . assert . notCalled ( fireEventSpy )
819790 } )
820791 } )
821792} )
0 commit comments