From 79185c3cf4932fc8908a4e4de596594c82902afe Mon Sep 17 00:00:00 2001 From: eleanorjboyd Date: Mon, 31 Jul 2023 11:17:36 -0700 Subject: [PATCH] fix unused vars --- .../testController/server.unit.test.ts | 47 ++++++------------- 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/src/test/testing/testController/server.unit.test.ts b/src/test/testing/testController/server.unit.test.ts index 4cc86c4851d1..36bd00633f8c 100644 --- a/src/test/testing/testController/server.unit.test.ts +++ b/src/test/testing/testController/server.unit.test.ts @@ -27,8 +27,6 @@ suite('Python Test Server', () => { let stubExecutionService: IPythonExecutionService; let server: PythonTestServer; let sandbox: sinon.SinonSandbox; - let execArgs: string[]; - let spawnOptions: SpawnOptions; let v4Stub: sinon.SinonStub; let debugLauncher: ITestDebugLauncher; let mockProc: MockChildProcess; @@ -42,11 +40,7 @@ suite('Python Test Server', () => { v4Stub.returns(fakeUuid); stubExecutionService = ({ - execObservable: (args: string[], spawnOptionsProvided: SpawnOptions) => { - execArgs = args; - spawnOptions = spawnOptionsProvided; - return Promise.resolve({ stdout: '', stderr: '' }); - }, + execObservable: () => Promise.resolve({ stdout: '', stderr: '' }), } as unknown) as IPythonExecutionService; stubExecutionFactory = ({ @@ -73,7 +67,6 @@ suite('Python Test Server', () => { teardown(() => { sandbox.restore(); - execArgs = []; server.dispose(); }); @@ -201,10 +194,8 @@ suite('Python Test Server', () => { /* no op */ }); const stubExecutionService2 = ({ - execObservable: (args: string[], spawnOptionsProvided: SpawnOptions) => { + execObservable: () => { client.connect(server.getPort()); - execArgs = args; - spawnOptions = spawnOptionsProvided; return ({ proc: mockProc, out: output, @@ -260,10 +251,8 @@ suite('Python Test Server', () => { /* no op */ }); const stubExecutionService2 = ({ - execObservable: (args: string[], spawnOptionsProvided: SpawnOptions) => { + execObservable: () => { client.connect(server.getPort()); - execArgs = args; - spawnOptions = spawnOptionsProvided; return ({ proc: mockProc, out: output, @@ -316,10 +305,8 @@ suite('Python Test Server', () => { /* no op */ }); const stubExecutionService2 = ({ - execObservable: (args: string[], spawnOptionsProvided: SpawnOptions) => { + execObservable: () => { client.connect(server.getPort()); - execArgs = args; - spawnOptions = spawnOptionsProvided; return ({ proc: mockProc, out: output, @@ -385,19 +372,17 @@ Request-uuid: UUID_HERE /* no op */ }); const stubExecutionService2 = ({ - execObservable: (args: string[], spawnOptionsProvided: SpawnOptions) => { - client.connect(server.getPort()); - execArgs = args; - spawnOptions = spawnOptionsProvided; - return ({ - proc: mockProc, - out: output, - dispose: () => { - /* no-body */ - }, - }) + execObservable: () => { + client.connect(server.getPort()); + return ({ + proc: mockProc, + out: output, + dispose: () => { + /* no-body */ }, - } as unknown) as IPythonExecutionService; + }) + }, + } as unknown) as IPythonExecutionService; const stubExecutionFactory2 = ({ createActivatedEnvironment: () => Promise.resolve(stubExecutionService2), } as unknown) as IPythonExecutionFactory; @@ -436,10 +421,8 @@ Request-uuid: UUID_HERE /* no op */ }); const stubExecutionService2 = ({ - execObservable: (args: string[], spawnOptionsProvided: SpawnOptions) => { + execObservable: () => { client.connect(server.getPort()); - execArgs = args; - spawnOptions = spawnOptionsProvided; return ({ proc: mockProc, out: output,