Skip to content

Commit d539897

Browse files
committed
potential build error
1 parent 131b286 commit d539897

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/hub/src/lib/cache-management.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
type CachedFileInfo,
99
} from "./cache-management";
1010
import { stat, readdir, realpath, lstat } from "node:fs/promises";
11-
import type { Dirent, Stats } from "node:fs";
11+
import type { Stats } from "node:fs";
1212
import { join } from "node:path";
1313

1414
// Mocks
@@ -86,7 +86,9 @@ describe("scanSnapshotDir", () => {
8686
test("should scan a valid snapshot directory", async () => {
8787
const cachedFiles: CachedFileInfo[] = [];
8888
const blobStats = new Map<string, Stats>();
89-
vi.mocked(readdir).mockResolvedValueOnce([{ name: "file1", isDirectory: () => false } as Dirent]);
89+
vi.mocked(readdir).mockResolvedValueOnce([
90+
{ name: "file1", isDirectory: () => false } as Awaited<ReturnType<typeof readdir>>[0],
91+
]);
9092

9193
vi.mocked(realpath).mockResolvedValueOnce("/fake/realpath");
9294
vi.mocked(lstat).mockResolvedValueOnce({ size: 1024, atimeMs: Date.now(), mtimeMs: Date.now() } as Stats);

0 commit comments

Comments
 (0)