1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Simplify more usages of getDiForUnitTesting

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2023-03-07 16:52:07 +02:00 committed by Sebastian Malton
parent 8bab6bde14
commit 4fd01ef8f4
3 changed files with 6 additions and 4 deletions

View File

@ -13,6 +13,8 @@ describe("get-electron-app-path", () => {
beforeEach(() => {
const di = getDiForUnitTesting();
di.unoverride(getElectronAppPathInjectable);
const appStub = {
name: "some-app-name",

View File

@ -12,6 +12,8 @@ describe("get-editor-height-from-lines-number", () => {
beforeEach(() => {
const di = getDiForUnitTesting();
di.unoverride(getEditorHeightFromLinesCountInjectable);
getEditorHeightFromLinesNumber = di.inject(getEditorHeightFromLinesCountInjectable);
});

View File

@ -168,9 +168,7 @@ interface Environment {
}
export const getApplicationBuilder = () => {
const mainDi = getMainDi({
doGeneralOverrides: true,
});
const mainDi = getMainDi();
runInAction(() => {
registerFeature(
@ -236,7 +234,7 @@ export const getApplicationBuilder = () => {
const createElectronWindowFake: CreateElectronWindow = (configuration) => {
const windowId = configuration.id;
const windowDi = getRendererDi({ doGeneralOverrides: true });
const windowDi = getRendererDi();
overrideForWindow(windowDi, windowId);
overrideFsWithFakes(windowDi);