Introduce a centralised way to emit telemetry from calls of injectable functions (#6164)

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Co-authored-by: Juho Heikka <juho.heikka@gmail.com>
This commit is contained in:
authored and GitHub committed 2022-09-02 09:33:22 -04:00
1 parent 60b538eec1
commit fc3512daf2
43 files changed
+527 -163

No files matched your search

@@ -14,7 +14,7 @@ import { ConfirmDialog } from "../confirm-dialog";
import type { AsyncFnMock } from "@async-fn/jest";
import asyncFn from "@async-fn/jest";
import { getDiForUnitTesting } from "../../getDiForUnitTesting";
import { computed } from "mobx";
import { computed, runInAction } from "mobx";
import clusterInjectable from "./dependencies/cluster.injectable";
import type { DiRender } from "../test-utils/renderFor";
import { renderFor } from "../test-utils/renderFor";
@@ -34,11 +34,13 @@ describe("kube-object-menu", () => {
beforeEach(() => {
di = getDiForUnitTesting({ doGeneralOverrides: true });
di.register(
someMenuItemInjectable,
someOtherMenuItemInjectable,
someAnotherMenuItemInjectable,
);
runInAction(() => {
di.register(
someMenuItemInjectable,
someOtherMenuItemInjectable,
someAnotherMenuItemInjectable,
);
});
render = renderFor(di);