Skip to content

Commit

Permalink
env should be undefined if not explicitly passed in
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Oct 29, 2024
1 parent 0ccb053 commit 40ff863
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/test/common/terminals/helper.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@ suite('Terminal Service helpers', () => {
expect(safeTerminalOptions).to.not.have.property('PYTHONSTARTUP');
});

test('Env should be undefined if not explicitly passed in ', () => {
const theTitle = 'Hello';
const terminal = 'Terminal Created';
when(terminalManager.createTerminal(anything())).thenReturn(terminal as any);

const term = helper.createTerminal(theTitle);

verify(terminalManager.createTerminal(anything())).once();
const args = capture(terminalManager.createTerminal).first()[0];
expect(term).to.be.deep.equal(terminal);
expect(args.env).to.be.deep.equal(undefined);
});

test('Create terminal without a title', () => {
const terminal = 'Terminal Created';
when(terminalManager.createTerminal(anything())).thenReturn(terminal as any);
Expand Down

0 comments on commit 40ff863

Please sign in to comment.