Add stat to fake FS

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-12-06 09:19:00 -05:00
1 parent 69cfe9a25e
commit 36063d86af
2 files changed
+3

No files matched your search

+2
View File
@@ -20,6 +20,7 @@ const fsInjectable = getInjectable({
lstat,
rm,
access,
stat,
},
ensureDir,
ensureDirSync,
@@ -54,6 +55,7 @@ const fsInjectable = getInjectable({
ensureDir: ensureDir as (path: string, options?: number | fse.EnsureOptions ) => Promise<void>,
ensureDirSync,
createReadStream,
stat,
};
},
causesSideEffects: true,
+1
View File
@@ -61,6 +61,7 @@ export const getOverrideFsWithFakes = () => {
ensureDir: async (path, opts) => ensureDirSync(path, opts),
ensureDirSync,
createReadStream: root.createReadStream as any,
stat: root.promises.stat as any,
}));
};
};