Skip to content

Commit f00d464

Browse files
committed
test
1 parent 8e7244b commit f00d464

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,20 @@ suite('Terminal Service', () => {
204204
terminalHelper.setup((h) => h.identifyTerminalShell(TypeMoq.It.isAny())).returns(() => TerminalShellType.bash);
205205
terminalManager.setup((t) => t.createTerminal(TypeMoq.It.isAny())).returns(() => terminal.object);
206206

207-
await service.sendText(textToSend);
207+
service.ensureTerminal();
208+
service.executeCommand(textToSend, true);
208209

209-
terminal.verify((t) => t.show(TypeMoq.It.isValue(true)), TypeMoq.Times.exactly(2));
210+
terminal.verify((t) => t.show(TypeMoq.It.isValue(true)), TypeMoq.Times.exactly(1));
210211
terminal.verify((t) => t.sendText(TypeMoq.It.isValue(textToSend)), TypeMoq.Times.exactly(1));
211212
});
212213

213214
// Ensure executeCommand is called when Python shell integration and terminal shell integration are both enabled
215+
test('Ensure executeCommand is called when Python shell integration and terminal shell integration are both enabled', async () => {
216+
pythonConfig
217+
.setup((p) => p.get('terminal.shellIntegration.enabled'))
218+
.returns(() => true)
219+
.verifiable(TypeMoq.Times.once());
220+
});
214221

215222
test('Ensure terminal is not shown if `hideFromUser` option is set to `true`', async () => {
216223
terminalHelper

0 commit comments

Comments
 (0)