fix(filesystem): use vi.fn() instead of jest.fn() in test

The project uses Vitest, not Jest. Replace jest.fn() with vi.fn()
to fix the ReferenceError in the relative path resolution test.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
olaservo
2026-02-04 05:24:02 -07:00
parent 39a1db9bf2
commit dd6594c083

View File

@@ -211,7 +211,7 @@ describe('Lib Functions', () => {
// Mock process.cwd to return a directory outside allowed directories
const disallowedCwd = process.platform === 'win32' ? 'C:\\Windows\\System32' : '/root';
(process as any).cwd = jest.fn(() => disallowedCwd);
(process as any).cwd = vi.fn(() => disallowedCwd);
try {
const result = await validatePath(relativePath);