qwen-code/scripts/tests/test-setup.ts
2026-05-04 17:38:07 +08:00

20 lines
364 B
TypeScript

/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { vi } from 'vitest';
vi.mock('fs', async () => {
const actual = await vi.importActual<typeof import('fs')>('fs');
const appendFileSync = vi.fn();
return {
...actual,
appendFileSync,
default: {
...actual,
appendFileSync,
},
};
});