mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Update tests to use more business logic
- To have a higher confidence in the code, given that the old tests didn't save us from modifying the code before. Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
bc149f0627
commit
5dc94f291b
9 files changed
+197
-866
No files matched your search
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 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 type { KubeJsonApi } from "../../common/k8s-api/kube-json-api";
|
||||
import apiKubeInjectable from "./api-kube.injectable";
|
||||
|
||||
export type ApiKubeGet = KubeJsonApi["get"];
|
||||
|
||||
const apiKubeGetInjectable = getInjectable({
|
||||
id: "api-kube-get",
|
||||
instantiate: (di): ApiKubeGet => {
|
||||
const apiKube = di.inject(apiKubeInjectable);
|
||||
|
||||
return (...params) => apiKube.get(...params);
|
||||
},
|
||||
});
|
||||
|
||||
export default apiKubeGetInjectable;
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 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 type { KubeJsonApi } from "../../common/k8s-api/kube-json-api";
|
||||
import apiKubeInjectable from "./api-kube.injectable";
|
||||
|
||||
export type ApiKubePatch = KubeJsonApi["patch"];
|
||||
|
||||
const apiKubePatchInjectable = getInjectable({
|
||||
id: "api-kube-patch",
|
||||
instantiate: (di): ApiKubePatch => {
|
||||
const apiKube = di.inject(apiKubeInjectable);
|
||||
|
||||
return (...params) => apiKube.patch(...params);
|
||||
},
|
||||
});
|
||||
|
||||
export default apiKubePatchInjectable;
|
||||
Reference in new issue
Block a user