Skip to content

Commit 40ff863

Browse files
committed
env should be undefined if not explicitly passed in
1 parent 0ccb053 commit 40ff863

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,19 @@ suite('Terminal Service helpers', () => {
108108
expect(safeTerminalOptions).to.not.have.property('PYTHONSTARTUP');
109109
});
110110

111+
test('Env should be undefined if not explicitly passed in ', () => {
112+
const theTitle = 'Hello';
113+
const terminal = 'Terminal Created';
114+
when(terminalManager.createTerminal(anything())).thenReturn(terminal as any);
115+
116+
const term = helper.createTerminal(theTitle);
117+
118+
verify(terminalManager.createTerminal(anything())).once();
119+
const args = capture(terminalManager.createTerminal).first()[0];
120+
expect(term).to.be.deep.equal(terminal);
121+
expect(args.env).to.be.deep.equal(undefined);
122+
});
123+
111124
test('Create terminal without a title', () => {
112125
const terminal = 'Terminal Created';
113126
when(terminalManager.createTerminal(anything())).thenReturn(terminal as any);

0 commit comments

Comments
 (0)