Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorjboyd committed Nov 13, 2024
1 parent f37a7b6 commit 9b9c45c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as assert from 'assert';
import { TestRun, Uri, TestRunProfileKind } from 'vscode';
import { TestRun, Uri, TestRunProfileKind, DebugSessionOptions } from 'vscode';
import * as typeMoq from 'typemoq';
import * as sinon from 'sinon';
import * as path from 'path';
Expand Down Expand Up @@ -238,7 +238,7 @@ suite('pytest test execution adapter', () => {
const deferred3 = createDeferred();
utilsWriteTestIdsFileStub.callsFake(() => Promise.resolve('testIdPipe-mockName'));
debugLauncher
.setup((dl) => dl.launchDebugger(typeMoq.It.isAny(), typeMoq.It.isAny()))
.setup((dl) => dl.launchDebugger(typeMoq.It.isAny(), typeMoq.It.isAny(), typeMoq.It.isAny()))
.returns(async (_opts, callback) => {
traceInfo('stubs launch debugger');
if (typeof callback === 'function') {
Expand Down Expand Up @@ -273,6 +273,10 @@ suite('pytest test execution adapter', () => {
return true;
}),
typeMoq.It.isAny(),
typeMoq.It.is<DebugSessionOptions>((sessionOptions) => {
assert.equal(sessionOptions.testRun, testRun.object);
return true;
}),
),
typeMoq.Times.once(),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as assert from 'assert';
import { TestRun, TestRunProfileKind, Uri } from 'vscode';
import { DebugSessionOptions, TestRun, TestRunProfileKind, Uri } from 'vscode';
import * as typeMoq from 'typemoq';
import * as sinon from 'sinon';
import * as path from 'path';
Expand Down Expand Up @@ -237,7 +237,7 @@ suite('Unittest test execution adapter', () => {
const deferred3 = createDeferred();
utilsWriteTestIdsFileStub.callsFake(() => Promise.resolve('testIdPipe-mockName'));
debugLauncher
.setup((dl) => dl.launchDebugger(typeMoq.It.isAny(), typeMoq.It.isAny()))
.setup((dl) => dl.launchDebugger(typeMoq.It.isAny(), typeMoq.It.isAny(), typeMoq.It.isAny()))
.returns(async (_opts, callback) => {
traceInfo('stubs launch debugger');
if (typeof callback === 'function') {
Expand Down Expand Up @@ -271,6 +271,10 @@ suite('Unittest test execution adapter', () => {
return true;
}),
typeMoq.It.isAny(),
typeMoq.It.is<DebugSessionOptions>((sessionOptions) => {
assert.equal(sessionOptions.testRun, testRun.object);
return true;
}),
),
typeMoq.Times.once(),
);
Expand Down

0 comments on commit 9b9c45c

Please sign in to comment.