From 4673ff58d85b3079088067d5bdb94db33c968fb1 Mon Sep 17 00:00:00 2001 From: Coco Sheng Date: Tue, 12 May 2026 14:53:27 -0400 Subject: [PATCH] test(integration): mock getRipgrepPath in ripgrep-real E2E tests --- integration-tests/ripgrep-real.test.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/integration-tests/ripgrep-real.test.ts b/integration-tests/ripgrep-real.test.ts index 57973e4a70..1e9bcdd097 100644 --- a/integration-tests/ripgrep-real.test.ts +++ b/integration-tests/ripgrep-real.test.ts @@ -8,7 +8,10 @@ import { describe, it, expect, beforeAll, afterAll } from 'vitest'; import * as path from 'node:path'; import * as fs from 'node:fs/promises'; import * as os from 'node:os'; -import { RipGrepTool } from '../packages/core/src/tools/ripGrep.js'; +import { + RipGrepTool, + resolveRipgrepPath, +} from '../packages/core/src/tools/ripGrep.js'; import { Config } from '../packages/core/src/config/config.js'; import { WorkspaceContext } from '../packages/core/src/utils/workspaceContext.js'; import { createMockMessageBus } from '../packages/core/src/test-utils/mock-message-bus.js'; @@ -48,6 +51,10 @@ class MockConfig { validatePathAccess() { return null; } + + async getRipgrepPath() { + return resolveRipgrepPath(); + } } describe('ripgrep-real-direct', () => {