Skip to content

Commit 205c7fd

Browse files
hannesrudolphdaniel-lxs
authored andcommitted
fix: use dynamic home directory in webview tests for cross-platform compatibility
1 parent 964af43 commit 205c7fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/webview/__tests__/webviewMessageHandler.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ vi.mock("fs/promises", () => ({
7474

7575
import * as vscode from "vscode"
7676
import fs from "fs/promises"
77+
import * as os from "os"
7778
import * as fsUtils from "../../../utils/fs"
7879
import { getWorkspacePath } from "../../../utils/path"
7980
import { ensureSettingsDirectoryExists } from "../../../utils/globalContext"
@@ -397,7 +398,8 @@ describe("webviewMessageHandler - deleteCustomMode", () => {
397398

398399
it("should delete a global mode and its rules folder", async () => {
399400
const slug = "test-global-mode"
400-
const rulesFolderPath = `/Users/hrudolph/.roo/rules-${slug}`
401+
const homeDir = os.homedir()
402+
const rulesFolderPath = `${homeDir}/.roo/rules-${slug}`
401403

402404
vi.mocked(mockClineProvider.customModesManager.getCustomModes).mockResolvedValue([
403405
{

0 commit comments

Comments
 (0)