Skip to content

Commit 8fff8ed

Browse files
committed
Add testAuthUtil to region profile manager
1 parent b8d2c3a commit 8fff8ed

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/amazonq/test/unit/codewhisperer/region/regionProfileManager.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ import assert, { fail } from 'assert'
88
import { AuthUtil, RegionProfile, RegionProfileManager, defaultServiceConfig } from 'aws-core-vscode/codewhisperer'
99
import { globals } from 'aws-core-vscode/shared'
1010
import { constants } from 'aws-core-vscode/auth'
11+
import { createTestAuthUtil } from 'aws-core-vscode/test'
1112

1213
const enterpriseSsoStartUrl = 'https://enterprise.awsapps.com/start'
1314
const region = 'us-east-1'
1415

15-
describe('RegionProfileManager', function () {
16+
describe('RegionProfileManager', async function () {
1617
let regionProfileManager: RegionProfileManager
1718

1819
const profileFoo: RegionProfile = {
@@ -22,6 +23,8 @@ describe('RegionProfileManager', function () {
2223
description: 'foo description',
2324
}
2425

26+
await createTestAuthUtil()
27+
2528
async function setupConnection(type: 'builderId' | 'idc') {
2629
if (type === 'builderId') {
2730
await AuthUtil.instance.login(constants.builderIdStartUrl, region)
@@ -34,7 +37,7 @@ describe('RegionProfileManager', function () {
3437
}
3538
}
3639

37-
beforeEach(function () {
40+
beforeEach(async function () {
3841
regionProfileManager = new RegionProfileManager(AuthUtil.instance)
3942
})
4043

0 commit comments

Comments
 (0)