Skip to content

Commit 37cd45b

Browse files
committed
make sure to be safe when checking for property potentitally empty
1 parent 6d8ba24 commit 37cd45b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ suite('Terminal Service helpers', () => {
103103
const term = helper.createTerminal(theTitle);
104104
const args = capture(terminalManager.createTerminal).first()[0];
105105
expect(term).to.be.deep.equal(terminal);
106-
const temp = args.env;
107-
// parse through temp or args.env and make sure there is no PYTHONSTARTUP
108-
expect(temp).to.not.have.property('PYTHONSTARTUP');
106+
const terminalOptions = args.env;
107+
const safeTerminalOptions = terminalOptions || {};
108+
expect(safeTerminalOptions).to.not.have.property('PYTHONSTARTUP');
109109
});
110110
test('Create terminal without a title', () => {
111111
const terminal = 'Terminal Created';

0 commit comments

Comments
 (0)