Skip to content

Commit d327903

Browse files
committed
try to add more test
1 parent 5f53706 commit d327903

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,21 @@ suite('Terminal Service helpers', () => {
107107
const safeTerminalOptions = terminalOptions || {};
108108
expect(safeTerminalOptions).to.not.have.property('PYTHONSTARTUP');
109109
});
110+
test('Create terminal should respect env passed in', () => {
111+
const terminal = 'Terminal Created';
112+
when(terminalManager.createTerminal(anything())).thenReturn(terminal as any);
113+
terminalManager.createTerminal({
114+
name: 'Python',
115+
env: {},
116+
hideFromUser: undefined,
117+
});
118+
const args = capture(terminalManager.createTerminal).first()[0];
119+
const terminalOptions = args.env;
120+
const safeTerminalOptions = terminalOptions || {};
121+
expect(safeTerminalOptions).to.have.property('myCustomEnv', '123');
122+
});
123+
})
124+
110125
test('Create terminal without a title', () => {
111126
const terminal = 'Terminal Created';
112127
when(terminalManager.createTerminal(anything())).thenReturn(terminal as any);

0 commit comments

Comments
 (0)