diff options
| author | Tommaso Sciortino <[email protected]> | 2025-05-30 18:25:47 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-30 18:25:47 -0700 |
| commit | 21fba832d1b4ea7af43fb887d9b2b38fcf8210d0 (patch) | |
| tree | 7200d2fac3a55c385e0a2dac34b5282c942364bc /packages/server/src/__mocks__/fs/promises.ts | |
| parent | c81148a0cc8489f657901c2cc7247c0834075e1a (diff) | |
Rename server->core (#638)
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; |
