diff options
Diffstat (limited to 'packages/server/src/__mocks__/fs/promises.ts')
| -rw-r--r-- | packages/server/src/__mocks__/fs/promises.ts | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/packages/server/src/__mocks__/fs/promises.ts b/packages/server/src/__mocks__/fs/promises.ts deleted file mode 100644 index 42385911..00000000 --- a/packages/server/src/__mocks__/fs/promises.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -import { vi } from 'vitest'; -import * as actualFsPromises from 'node:fs/promises'; - -const readFileMock = vi.fn(); - -// Export a control object so tests can access and manipulate the mock -export const mockControl = { - mockReadFile: readFileMock, -}; - -// Export all other functions from the actual fs/promises module -export const { - access, - appendFile, - chmod, - chown, - copyFile, - cp, - lchmod, - lchown, - link, - lstat, - mkdir, - open, - opendir, - readdir, - readlink, - realpath, - rename, - rmdir, - rm, - stat, - symlink, - truncate, - unlink, - utimes, - watch, - writeFile, -} = actualFsPromises; - -// Override readFile with our mock -export const readFile = readFileMock; |
