Skip to content

Commit 5d86a52

Browse files
committed
fix test
1 parent 780c3fe commit 5d86a52

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/common/terminals/activation.unit.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
'use strict';
55
import { expect } from 'chai';
6+
import * as sinon from 'sinon';
67
import { anything, instance, mock, verify, when } from 'ts-mockito';
78
import * as TypeMoq from 'typemoq';
89
import { Terminal, Uri } from 'vscode';
@@ -15,6 +16,7 @@ import { IDisposable } from '../../../client/common/types';
1516
import { TerminalAutoActivation } from '../../../client/terminals/activation';
1617
import { ITerminalAutoActivation } from '../../../client/terminals/types';
1718
import { noop } from '../../core';
19+
import * as extapi from '../../../client/envExt/api.internal';
1820

1921
suite('Terminal Auto Activation', () => {
2022
let activator: ITerminalActivator;
@@ -25,6 +27,7 @@ suite('Terminal Auto Activation', () => {
2527
let terminal: Terminal;
2628

2729
setup(() => {
30+
sinon.stub(extapi, 'shouldEnvExtHandleActivation').returns(false);
2831
terminal = ({
2932
dispose: noop,
3033
hide: noop,
@@ -46,6 +49,9 @@ suite('Terminal Auto Activation', () => {
4649
instance(activeResourceService),
4750
);
4851
});
52+
teardown(() => {
53+
sinon.restore();
54+
});
4955

5056
test('New Terminals should be activated', async () => {
5157
type EventHandler = (e: Terminal) => void;

0 commit comments

Comments
 (0)