mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make global override for accessing file system throw to require explicit override
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
175add91fc
commit
b1c3a59709
@ -33,7 +33,9 @@ export const getDiForUnitTesting = ({ doGeneralOverrides } = { doGeneralOverride
|
||||
if (doGeneralOverrides) {
|
||||
di.override(getValueFromRegisteredChannelInjectable, () => () => undefined);
|
||||
|
||||
di.override(readDirInjectable, () => () => Promise.resolve([]));
|
||||
di.override(readDirInjectable, () => () => {
|
||||
throw new Error("Tried to read contents of a directory from file system without specifying explicit override.");
|
||||
});
|
||||
|
||||
di.override(readFileInjectable, () => () => {
|
||||
throw new Error("Tried to read a file from file system without specifying explicit override.");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user