mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fixing tests, part 1
This commit is contained in:
1 parent
e324ab1a55
commit
da9b20030f
6 files changed
+18
-12
No files matched your search
@@ -1,17 +1,19 @@
|
||||
import packageInfo from "../../../package.json"
|
||||
import { bundledKubectl, Kubectl } from "../../../src/main/kubectl";
|
||||
|
||||
jest.mock("electron")
|
||||
jest.mock("../../../common/user-store");
|
||||
jest.mock("../../../src/common/user-store")
|
||||
|
||||
// fixme: ENOENT: no such file or directory, mkdir '/foo/bar'
|
||||
describe("kubectlVersion", () => {
|
||||
|
||||
it("returns bundled version if exactly same version used", async () => {
|
||||
const kubectl = new Kubectl(bundledKubectl.kubectlVersion)
|
||||
expect(kubectl.kubectlVersion).toBe(bundledKubectl.kubectlVersion)
|
||||
})
|
||||
|
||||
it("returns bundled version if same major.minor version is used", async () => {
|
||||
const kubectl = new Kubectl("1.17.0")
|
||||
const { bundledKubectlVersion } = packageInfo.config;
|
||||
const kubectl = new Kubectl(bundledKubectlVersion);
|
||||
expect(kubectl.kubectlVersion).toBe(bundledKubectl.kubectlVersion)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user