mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add stat to fake FS
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
69cfe9a25e
commit
36063d86af
@ -20,6 +20,7 @@ const fsInjectable = getInjectable({
|
|||||||
lstat,
|
lstat,
|
||||||
rm,
|
rm,
|
||||||
access,
|
access,
|
||||||
|
stat,
|
||||||
},
|
},
|
||||||
ensureDir,
|
ensureDir,
|
||||||
ensureDirSync,
|
ensureDirSync,
|
||||||
@ -54,6 +55,7 @@ const fsInjectable = getInjectable({
|
|||||||
ensureDir: ensureDir as (path: string, options?: number | fse.EnsureOptions ) => Promise<void>,
|
ensureDir: ensureDir as (path: string, options?: number | fse.EnsureOptions ) => Promise<void>,
|
||||||
ensureDirSync,
|
ensureDirSync,
|
||||||
createReadStream,
|
createReadStream,
|
||||||
|
stat,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
causesSideEffects: true,
|
causesSideEffects: true,
|
||||||
|
|||||||
@ -61,6 +61,7 @@ export const getOverrideFsWithFakes = () => {
|
|||||||
ensureDir: async (path, opts) => ensureDirSync(path, opts),
|
ensureDir: async (path, opts) => ensureDirSync(path, opts),
|
||||||
ensureDirSync,
|
ensureDirSync,
|
||||||
createReadStream: root.createReadStream as any,
|
createReadStream: root.createReadStream as any,
|
||||||
|
stat: root.promises.stat as any,
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user