mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Change typing for after/before window/application start (#7342)
- Now the callback is provided with an object containing either `mainDi` or `windowDi` fields. This should help with confusion over which environment the `di` is for Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
b99b06980e
commit
a63f737adb
62 files changed
+185
-189
No files matched your search
+1
-1
@@ -32,7 +32,7 @@ describe("opening application window using tray", () => {
|
||||
|
||||
builder = getApplicationBuilder();
|
||||
|
||||
builder.beforeApplicationStart((mainDi) => {
|
||||
builder.beforeApplicationStart(({ mainDi }) => {
|
||||
mainDi.override(focusApplicationInjectable, () => focusApplicationMock);
|
||||
|
||||
mainDi.override(
|
||||
|
||||
+7
-9
@@ -22,17 +22,15 @@ describe("quitting the app using application menu", () => {
|
||||
|
||||
builder = getApplicationBuilder();
|
||||
|
||||
builder.beforeApplicationStart(
|
||||
(mainDi) => {
|
||||
mainDi.unoverride(stopServicesAndExitAppInjectable);
|
||||
builder.beforeApplicationStart(({ mainDi }) => {
|
||||
mainDi.unoverride(stopServicesAndExitAppInjectable);
|
||||
|
||||
clusterManagerStub = { stop: jest.fn() } as unknown as ClusterManager;
|
||||
mainDi.override(clusterManagerInjectable, () => clusterManagerStub);
|
||||
clusterManagerStub = { stop: jest.fn() } as unknown as ClusterManager;
|
||||
mainDi.override(clusterManagerInjectable, () => clusterManagerStub);
|
||||
|
||||
exitAppMock = jest.fn();
|
||||
mainDi.override(exitAppInjectable, () => exitAppMock);
|
||||
},
|
||||
);
|
||||
exitAppMock = jest.fn();
|
||||
mainDi.override(exitAppInjectable, () => exitAppMock);
|
||||
});
|
||||
|
||||
await builder.render();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user