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:
parent
39a1db9bf2
commit
dd6594c083
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue