mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Introduce and use ApplicationBuilder.quit in afterEach() hooks
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
8136e23ac6
commit
f11145045b
76 files changed
+497
-153
No files matched your search
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { beforeQuitOfBackEndInjectionToken } from "../start-main-application/runnable-tokens/before-quit-of-back-end-injection-token";
|
||||
import lensProxyInjectable from "./lens-proxy.injectable";
|
||||
|
||||
const stopLensProxyOnQuitInjectable = getInjectable({
|
||||
id: "stop-lens-proxy-on-quit",
|
||||
instantiate: (di) => {
|
||||
const lensProxy = di.inject(lensProxyInjectable);
|
||||
|
||||
return {
|
||||
id: "stop-lens-proxy",
|
||||
run: () => {
|
||||
lensProxy.close();
|
||||
},
|
||||
};
|
||||
},
|
||||
injectionToken: beforeQuitOfBackEndInjectionToken,
|
||||
});
|
||||
|
||||
export default stopLensProxyOnQuitInjectable;
|
||||
@@ -82,8 +82,6 @@ const setupLensProxyInjectable = getInjectable({
|
||||
};
|
||||
},
|
||||
|
||||
// causesSideEffects: true,
|
||||
|
||||
injectionToken: beforeApplicationIsLoadingInjectionToken,
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user