Skip to content

Commit 17d723a

Browse files
committed
fix(tests): add missing mocks for list-files tests
1 parent 299bce8 commit 17d723a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/services/glob/__tests__/list-files.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ import * as path from "path"
33
import { listFiles } from "../list-files"
44
import * as childProcess from "child_process"
55

6+
vi.mock("child_process")
7+
vi.mock("fs")
8+
vi.mock("vscode", () => ({
9+
env: {
10+
appRoot: "/mock/vscode/app/root",
11+
},
12+
}))
13+
14+
vi.mock("../../ripgrep", () => ({
15+
getBinPath: vi.fn().mockResolvedValue("/mock/path/to/rg"),
16+
}))
17+
618
vi.mock("../list-files", async () => {
719
const actual = await vi.importActual("../list-files")
820
return {

0 commit comments

Comments
 (0)