From f7c3657e60133ccd2107c1fa61f27b0800b60ca4 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Fri, 2 Dec 2022 15:50:13 -0500 Subject: [PATCH] Add fake access support Signed-off-by: Sebastian Malton --- src/common/fs/fs.injectable.ts | 2 ++ src/test-utils/override-fs-with-fakes.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/common/fs/fs.injectable.ts b/src/common/fs/fs.injectable.ts index 668294a510..74c3050936 100644 --- a/src/common/fs/fs.injectable.ts +++ b/src/common/fs/fs.injectable.ts @@ -19,6 +19,7 @@ const fsInjectable = getInjectable({ readdir, lstat, rm, + access, }, readFileSync, readJson, @@ -44,6 +45,7 @@ const fsInjectable = getInjectable({ pathExistsSync, lstat, rm, + access, }; }, causesSideEffects: true, diff --git a/src/test-utils/override-fs-with-fakes.ts b/src/test-utils/override-fs-with-fakes.ts index 0150071564..f259d0ac92 100644 --- a/src/test-utils/override-fs-with-fakes.ts +++ b/src/test-utils/override-fs-with-fakes.ts @@ -45,6 +45,7 @@ export const getOverrideFsWithFakes = () => { readdir: root.promises.readdir as any, lstat: root.promises.lstat as any, rm: root.promises.rm, + access: root.promises.access, })); }; };