Skip to content

Commit 99e02fa

Browse files
zuoyaofuctlai95
andauthored
Update packages/amazonq/test/unit/codewhisperer/service/securityScanHandler.test.ts
Co-authored-by: Tai Lai <[email protected]>
1 parent 80489a6 commit 99e02fa

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/amazonq/test/unit/codewhisperer/service/securityScanHandler.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ const buildMockListCodeScanFindingsResponse = (
6666
})
6767

6868
function getWorkspaceFolder(): string {
69-
if (vscode.workspace.workspaceFolders !== undefined && vscode.workspace.workspaceFolders.length > 0) {
70-
return vscode.workspace.workspaceFolders[0].uri.toString().split('file://')[1]
71-
}
72-
return path.join(__dirname, '../../../../../../core/src/testFixtures/workspaceFolder')
69+
return vscode.workspace.workspaceFolders?.[0]?.uri.fsPath ?? path.join(__dirname, '../../../../../../core/src/testFixtures/workspaceFolder')
7370
}
7471

7572
describe('securityScanHandler', function () {

0 commit comments

Comments
 (0)