Skip to content

Commit 9b9c45c

Browse files
committed
update tests
1 parent f37a7b6 commit 9b9c45c

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/test/testing/testController/pytest/pytestExecutionAdapter.unit.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Copyright (c) Microsoft Corporation. All rights reserved.
33
// Licensed under the MIT License.
44
import * as assert from 'assert';
5-
import { TestRun, Uri, TestRunProfileKind } from 'vscode';
5+
import { TestRun, Uri, TestRunProfileKind, DebugSessionOptions } from 'vscode';
66
import * as typeMoq from 'typemoq';
77
import * as sinon from 'sinon';
88
import * as path from 'path';
@@ -238,7 +238,7 @@ suite('pytest test execution adapter', () => {
238238
const deferred3 = createDeferred();
239239
utilsWriteTestIdsFileStub.callsFake(() => Promise.resolve('testIdPipe-mockName'));
240240
debugLauncher
241-
.setup((dl) => dl.launchDebugger(typeMoq.It.isAny(), typeMoq.It.isAny()))
241+
.setup((dl) => dl.launchDebugger(typeMoq.It.isAny(), typeMoq.It.isAny(), typeMoq.It.isAny()))
242242
.returns(async (_opts, callback) => {
243243
traceInfo('stubs launch debugger');
244244
if (typeof callback === 'function') {
@@ -273,6 +273,10 @@ suite('pytest test execution adapter', () => {
273273
return true;
274274
}),
275275
typeMoq.It.isAny(),
276+
typeMoq.It.is<DebugSessionOptions>((sessionOptions) => {
277+
assert.equal(sessionOptions.testRun, testRun.object);
278+
return true;
279+
}),
276280
),
277281
typeMoq.Times.once(),
278282
);

src/test/testing/testController/unittest/testExecutionAdapter.unit.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Copyright (c) Microsoft Corporation. All rights reserved.
33
// Licensed under the MIT License.
44
import * as assert from 'assert';
5-
import { TestRun, TestRunProfileKind, Uri } from 'vscode';
5+
import { DebugSessionOptions, TestRun, TestRunProfileKind, Uri } from 'vscode';
66
import * as typeMoq from 'typemoq';
77
import * as sinon from 'sinon';
88
import * as path from 'path';
@@ -237,7 +237,7 @@ suite('Unittest test execution adapter', () => {
237237
const deferred3 = createDeferred();
238238
utilsWriteTestIdsFileStub.callsFake(() => Promise.resolve('testIdPipe-mockName'));
239239
debugLauncher
240-
.setup((dl) => dl.launchDebugger(typeMoq.It.isAny(), typeMoq.It.isAny()))
240+
.setup((dl) => dl.launchDebugger(typeMoq.It.isAny(), typeMoq.It.isAny(), typeMoq.It.isAny()))
241241
.returns(async (_opts, callback) => {
242242
traceInfo('stubs launch debugger');
243243
if (typeof callback === 'function') {
@@ -271,6 +271,10 @@ suite('Unittest test execution adapter', () => {
271271
return true;
272272
}),
273273
typeMoq.It.isAny(),
274+
typeMoq.It.is<DebugSessionOptions>((sessionOptions) => {
275+
assert.equal(sessionOptions.testRun, testRun.object);
276+
return true;
277+
}),
274278
),
275279
typeMoq.Times.once(),
276280
);

0 commit comments

Comments
 (0)