diff options
| author | Taylor Mullen <[email protected]> | 2025-05-23 14:17:22 -0700 |
|---|---|---|
| committer | N. Taylor Mullen <[email protected]> | 2025-05-23 14:50:00 -0700 |
| commit | 1ff083af273a5c250ae745712eaee97cec1d5f18 (patch) | |
| tree | f52741a9c3e87d6d9d42962ef0af6a8dc5f8d020 /packages/server/src | |
| parent | 635666dec975548ee760131569384b629595165a (diff) | |
fix: Update dependencies to resolve deprecation warnings
Diffstat (limited to 'packages/server/src')
| -rw-r--r-- | packages/server/src/utils/memoryDiscovery.test.ts | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/packages/server/src/utils/memoryDiscovery.test.ts b/packages/server/src/utils/memoryDiscovery.test.ts index d104df7a..78ba1ba7 100644 --- a/packages/server/src/utils/memoryDiscovery.test.ts +++ b/packages/server/src/utils/memoryDiscovery.test.ts @@ -151,7 +151,9 @@ describe('loadServerHierarchicalMemory', () => { throw new Error('File not found'); }); - mockFs.readdir.mockImplementation(async (p) => { + mockFs.readdir.mockImplementation((async ( + p: fsSync.PathLike, + ): Promise<Dirent[]> => { if (p === CWD) { return [ { @@ -171,8 +173,8 @@ describe('loadServerHierarchicalMemory', () => { }, ] as Dirent[]; } - return []; - }); + return [] as Dirent[]; + }) as any); const { memoryContent, fileCount } = await loadServerHierarchicalMemory( CWD, @@ -226,7 +228,9 @@ describe('loadServerHierarchicalMemory', () => { throw new Error('File not found'); }); - mockFs.readdir.mockImplementation(async (p) => { + mockFs.readdir.mockImplementation((async ( + p: fsSync.PathLike, + ): Promise<Dirent[]> => { if (p === CWD) { return [ { name: 'sub', isFile: () => false, isDirectory: () => true }, @@ -241,8 +245,8 @@ describe('loadServerHierarchicalMemory', () => { }, ] as Dirent[]; } - return []; - }); + return [] as Dirent[]; + }) as any); const { memoryContent, fileCount } = await loadServerHierarchicalMemory( CWD, @@ -288,7 +292,9 @@ describe('loadServerHierarchicalMemory', () => { throw new Error('File not found'); }); - mockFs.readdir.mockImplementation(async (p) => { + mockFs.readdir.mockImplementation((async ( + p: fsSync.PathLike, + ): Promise<Dirent[]> => { if (p === CWD) { return [ { @@ -317,8 +323,8 @@ describe('loadServerHierarchicalMemory', () => { }, ] as Dirent[]; } - return []; - }); + return [] as Dirent[]; + }) as any); const { memoryContent, fileCount } = await loadServerHierarchicalMemory( CWD, @@ -349,11 +355,14 @@ describe('loadServerHierarchicalMemory', () => { } as Dirent); } - mockFs.readdir.mockImplementation(async (p) => { + mockFs.readdir.mockImplementation((async ( + p: fsSync.PathLike, + ): Promise<Dirent[]> => { if (p === CWD) return dirNames; - if (p.toString().startsWith(path.join(CWD, 'deep_dir_'))) return []; - return []; - }); + if (p.toString().startsWith(path.join(CWD, 'deep_dir_'))) + return [] as Dirent[]; + return [] as Dirent[]; + }) as any); mockFs.access.mockRejectedValue(new Error('not found')); await loadServerHierarchicalMemory(CWD, true); |
