mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Simplify global overrides of requestKubeResource and requestPatchKubeResource
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
4716dcc434
commit
5fb08960fe
2 files changed
+4
-12
No files matched your search
+2
-6
@@ -2,11 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getGlobalOverride } from "@k8slens/test-utils";
|
||||
import { getGlobalOverrideForFunction } from "@k8slens/test-utils";
|
||||
import requestKubeResourceInjectable from "./request-kube-resource.injectable";
|
||||
|
||||
export default getGlobalOverride(requestKubeResourceInjectable, () => () => {
|
||||
throw new Error(
|
||||
"Tried to call for kube resource without explicit override.",
|
||||
);
|
||||
});
|
||||
export default getGlobalOverrideForFunction(requestKubeResourceInjectable);
|
||||
+2
-6
@@ -2,11 +2,7 @@
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getGlobalOverride } from "@k8slens/test-utils";
|
||||
import { getGlobalOverrideForFunction } from "@k8slens/test-utils";
|
||||
import requestPatchKubeResourceInjectable from "./request-patch-kube-resource.injectable";
|
||||
|
||||
export default getGlobalOverride(requestPatchKubeResourceInjectable, () => () => {
|
||||
throw new Error(
|
||||
"Tried to call patching of kube resource without explicit override.",
|
||||
);
|
||||
});
|
||||
export default getGlobalOverrideForFunction(requestPatchKubeResourceInjectable);
|
||||
Reference in new issue
Block a user