Skip to content

Commit 4b8609e

Browse files
committed
Fix Log Uri Test
1 parent 3b3955a commit 4b8609e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/features/ExternalApi.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface IPowerShellExtensionClient {
1919
getPowerShellVersionDetails(uuid: string): Promise<IExternalPowerShellDetails>;
2020
waitUntilStarted(uuid: string): Promise<void>;
2121
getStorageUri(): vscode.Uri;
22+
getLogUri(): vscode.Uri;
2223
}
2324

2425
/*
@@ -171,6 +172,10 @@ export class ExternalApiFeature implements IPowerShellExtensionClient {
171172
return this.extensionContext.globalStorageUri.with({ scheme: "file"});
172173
}
173174

175+
public getLogUri(): vscode.Uri {
176+
return this.getLogUri().with({ scheme: "file"});
177+
}
178+
174179
public dispose(): void {
175180
// Nothing to dispose.
176181
}

test/core/paths.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ import { checkIfDirectoryExists, checkIfFileExists, ShellIntegrationScript } fro
99

1010
describe("Path assumptions", function () {
1111
let globalStorageUri: vscode.Uri;
12+
let logUri: vscode.Uri;
1213
before(async () => {
1314
const extension: IPowerShellExtensionClient = await utils.ensureEditorServicesIsConnected();
1415
globalStorageUri = extension.getStorageUri();
16+
logUri = extension.getLogUri();
1517
});
1618

1719
it("Creates the session folder at the correct path", async function () {
1820
assert(await checkIfDirectoryExists(vscode.Uri.joinPath(globalStorageUri, "sessions")));
1921
});
2022

2123
it("Creates the log folder at the correct path", async function () {
22-
assert(await checkIfDirectoryExists(vscode.Uri.joinPath(globalStorageUri, "logs")));
24+
assert(await checkIfDirectoryExists(logUri));
2325
});
2426

2527
it("Finds the Terminal Shell Integration Script", async function () {

0 commit comments

Comments
 (0)