1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix type error

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-06-10 08:23:45 -04:00
parent 571a5e360f
commit b93124b352

View File

@ -41,8 +41,8 @@ import { broadcastMessage } from "../../common/ipc";
import type { ChildProcess } from "child_process"; import type { ChildProcess } from "child_process";
import { spawn } from "child_process"; import { spawn } from "child_process";
import { Kubectl } from "../kubectl/kubectl"; import { Kubectl } from "../kubectl/kubectl";
import type { MockProxy } from "jest-mock-extended"; import type { DeepMockProxy } from "jest-mock-extended";
import { mock } from "jest-mock-extended"; import { mockDeep, mock } from "jest-mock-extended";
import { waitUntilUsed } from "tcp-port-used"; import { waitUntilUsed } from "tcp-port-used";
import type { Readable } from "stream"; import type { Readable } from "stream";
import { EventEmitter } from "stream"; import { EventEmitter } from "stream";
@ -140,12 +140,12 @@ describe("kube auth proxy tests", () => {
}); });
describe("spawn tests", () => { describe("spawn tests", () => {
let mockedCP: MockProxy<ChildProcess>; let mockedCP: DeepMockProxy<ChildProcess>;
let listeners: EventEmitter; let listeners: EventEmitter;
let proxy: KubeAuthProxy; let proxy: KubeAuthProxy;
beforeEach(async () => { beforeEach(async () => {
mockedCP = mock<ChildProcess>(); mockedCP = mockDeep<ChildProcess>();
listeners = new EventEmitter(); listeners = new EventEmitter();
const stderr = mockedCP.stderr = mock<Readable>(); const stderr = mockedCP.stderr = mock<Readable>();
const stdout = mockedCP.stdout = mock<Readable>(); const stdout = mockedCP.stdout = mock<Readable>();