Skip to content

Commit 903c22a

Browse files
committed
fix duplicate code
1 parent cee61d3 commit 903c22a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/amazonq/test/unit/codewhisperer/util/authUtil.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,13 @@ describe('AuthUtil', async function () {
367367
auth.session = new auth2.SsoLogin(auth.profileName, auth.lspAuth, auth.eventEmitter)
368368
}
369369

370-
const updateProfileStub = sinon.stub((auth as any).session, 'updateProfile').resolves()
370+
const updateProfileStubNew = sinon.stub((auth as any).session, 'updateProfile').resolves()
371371

372372
await auth.migrateSsoConnectionToLsp('test-client')
373373

374-
assert.ok(updateProfileStub.calledOnce)
374+
assert.ok(updateProfileStubNew.calledOnce)
375375
assert.ok(memento.update.calledWith('auth.profiles', undefined))
376-
assert.deepStrictEqual(updateProfileStub.firstCall.args[0], {
376+
assert.deepStrictEqual(updateProfileStubNew.firstCall.args[0], {
377377
startUrl: validProfile.startUrl,
378378
region: validProfile.ssoRegion,
379379
scopes: validProfile.scopes,
@@ -396,12 +396,12 @@ describe('AuthUtil', async function () {
396396
auth.session = new auth2.SsoLogin(auth.profileName, auth.lspAuth, auth.eventEmitter)
397397
}
398398

399-
const updateProfileStub = sinon.stub((auth as any).session, 'updateProfile').resolves()
399+
const updateProfileStubNext = sinon.stub((auth as any).session, 'updateProfile').resolves()
400400

401401
await auth.migrateSsoConnectionToLsp('test-client')
402402

403403
assert.ok(
404-
updateProfileStub.calledWith({
404+
updateProfileStubNext.calledWith({
405405
startUrl: validProfile.startUrl,
406406
region: validProfile.ssoRegion,
407407
scopes: validProfile.scopes,

0 commit comments

Comments
 (0)