Add ensureDir/Sync support to fake FS

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-12-06 09:18:59 -05:00
1 parent af48b7de5f
commit 8409d56fdf
2 files changed
+14

No files matched your search

+4
View File
@@ -21,6 +21,8 @@ const fsInjectable = getInjectable({
rm,
access,
},
ensureDir,
ensureDirSync,
readFileSync,
readJson,
writeJson,
@@ -48,6 +50,8 @@ const fsInjectable = getInjectable({
rm,
access,
copy: copy as (src: string, dest: string, options?: fse.CopyOptions) => Promise<void>,
ensureDir: ensureDir as (path: string, options?: number | fse.EnsureOptions ) => Promise<void>,
ensureDirSync,
};
},
causesSideEffects: true,