Skip to content

Commit fd4a20a

Browse files
committed
fix: unit tests
1 parent b51ea11 commit fd4a20a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

packages/core/src/test/testAuthUtil.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,23 @@ export async function createTestAuthUtil() {
2626
},
2727
}
2828

29+
const fakeCredential = {
30+
credentials: {
31+
accessKeyId: 'fake-access-key-id',
32+
secretAccessKey: 'fake-secret-access-key',
33+
sessionToken: 'fake-session-token',
34+
},
35+
updateCredentialsParams: {
36+
data: 'fake-data',
37+
},
38+
}
39+
2940
const mockLspAuth: Partial<LanguageClientAuth> = {
3041
registerSsoTokenChangedHandler: sinon.stub().resolves(),
3142
registerStsCredentialChangedHandler: sinon.stub().resolves(),
3243
updateSsoProfile: sinon.stub().resolves(),
3344
getSsoToken: sinon.stub().resolves(fakeToken),
34-
getIamCredential: sinon.stub().resolves({
35-
accessKeyId: 'fake-access-key-id',
36-
secretAccessKey: 'fake-secret-access-key',
37-
sessionToken: 'fake-session-token',
38-
}),
45+
getIamCredential: sinon.stub().resolves(fakeCredential),
3946
getProfile: sinon.stub().resolves({
4047
sso_registration_scopes: ['codewhisperer'],
4148
}),

0 commit comments

Comments
 (0)