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:
Sebastian Malton authored and GitHub committed 2023-03-13 15:35:33 +02:00
1 parent b99b06980e
commit a63f737adb
62 files changed
+185 -189

No files matched your search

@@ -36,7 +36,7 @@ describe("cluster/namespaces - edit namespace from new tab", () => {
builder.setEnvironmentToClusterFrame();
builder.beforeWindowStart((windowDi) => {
builder.beforeWindowStart(({ windowDi }) => {
windowDi.override(
directoryForLensLocalStorageInjectable,
() => "/some-directory-for-lens-local-storage",
@@ -26,7 +26,7 @@ describe("cluster/namespaces - edit namespaces from previously opened tab", () =
callForNamespaceMock = asyncFn();
builder.beforeWindowStart((windowDi) => {
builder.beforeWindowStart(({ windowDi }) => {
windowDi.override(
directoryForLensLocalStorageInjectable,
() => "/some-directory-for-lens-local-storage",
@@ -47,7 +47,7 @@ describe("cluster/namespaces - edit namespaces from previously opened tab", () =
let rendered: RenderResult;
beforeEach(async () => {
builder.beforeWindowStart(async (windowDi) => {
builder.beforeWindowStart(async ({ windowDi }) => {
const writeJsonFile = windowDi.inject(writeJsonFileInjectable);
await writeJsonFile(