Skip to content

Commit 6a84e58

Browse files
test: cover the asar.unpacked universal layout
CodeRabbit nit on the latest commit: add explicit coverage for the node_modules.asar.unpacked/@vscode/ripgrep-universal/<plat>-<arch>/<rg> candidate path. Mirrors the existing universal-layout test but targets the .asar.unpacked variant — the exact staged-install shape that motivated the universal-layout entries in the first place.
1 parent b2d6755 commit 6a84e58

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/services/ripgrep/__tests__/index.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ describe("getBinPath", () => {
8383
expect(await getBinPath(appRoot)).toBe(rg)
8484
})
8585

86+
it("resolves ripgrep from the unpacked `@vscode/ripgrep-universal` layout", async () => {
87+
const rg = path.join(appRoot, "node_modules.asar.unpacked/@vscode/ripgrep-universal/bin", platformDir, binName)
88+
mockFileExists.mockImplementation(async (p: string) => p === rg)
89+
90+
expect(await getBinPath(appRoot)).toBe(rg)
91+
})
92+
8693
it("returns undefined when ripgrep cannot be found", async () => {
8794
mockFileExists.mockResolvedValue(false)
8895

0 commit comments

Comments
 (0)