mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
remove spaces from tests
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
parent
e43dc28e36
commit
52bfcc6144
@ -33,7 +33,7 @@ describe("empty config", () => {
|
|||||||
id: "foo",
|
id: "foo",
|
||||||
preferences: {
|
preferences: {
|
||||||
terminalCWD: "/tmp",
|
terminalCWD: "/tmp",
|
||||||
icon: "data:image/jpeg;base64, iVBORw0KGgoAAAANSUhEUgAAA1wAAAKoCAYAAABjkf5",
|
icon: "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAA1wAAAKoCAYAAABjkf5",
|
||||||
clusterName: "minikube"
|
clusterName: "minikube"
|
||||||
},
|
},
|
||||||
kubeConfigPath: ClusterStore.embedCustomKubeConfig("foo", "fancy foo config"),
|
kubeConfigPath: ClusterStore.embedCustomKubeConfig("foo", "fancy foo config"),
|
||||||
@ -364,6 +364,6 @@ describe("pre 3.6.0-beta.1 config with an existing cluster", () => {
|
|||||||
|
|
||||||
it("migrates to modern format with icon not in file", async () => {
|
it("migrates to modern format with icon not in file", async () => {
|
||||||
const { icon } = clusterStore.clustersList[0].preferences;
|
const { icon } = clusterStore.clustersList[0].preferences;
|
||||||
expect(icon.startsWith("data:image/jpeg;base64, ")).toBe(true);
|
expect(icon.startsWith("data:image/jpeg;base64,")).toBe(true);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -28,7 +28,7 @@ export class ClusterIconSetting extends React.Component<Props> {
|
|||||||
try {
|
try {
|
||||||
if (file) {
|
if (file) {
|
||||||
const buf = Buffer.from(await file.arrayBuffer());
|
const buf = Buffer.from(await file.arrayBuffer());
|
||||||
cluster.preferences.icon = `data:${file.type};base64, ${buf.toString('base64')}`;
|
cluster.preferences.icon = `data:${file.type};base64,${buf.toString('base64')}`;
|
||||||
} else {
|
} else {
|
||||||
// this has to be done as a seperate branch (and not always) because `cluster`
|
// this has to be done as a seperate branch (and not always) because `cluster`
|
||||||
// is observable and triggers an update loop.
|
// is observable and triggers an update loop.
|
||||||
@ -73,4 +73,4 @@ export class ClusterIconSetting extends React.Component<Props> {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user