Skip to content

Commit

Permalink
make sure to be safe when checking for property potentitally empty
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Oct 28, 2024
1 parent 6d8ba24 commit 37cd45b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/common/terminals/helper.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ suite('Terminal Service helpers', () => {
const term = helper.createTerminal(theTitle);
const args = capture(terminalManager.createTerminal).first()[0];
expect(term).to.be.deep.equal(terminal);
const temp = args.env;
// parse through temp or args.env and make sure there is no PYTHONSTARTUP
expect(temp).to.not.have.property('PYTHONSTARTUP');
const terminalOptions = args.env;
const safeTerminalOptions = terminalOptions || {};
expect(safeTerminalOptions).to.not.have.property('PYTHONSTARTUP');
});
test('Create terminal without a title', () => {
const terminal = 'Terminal Created';
Expand Down

0 comments on commit 37cd45b

Please sign in to comment.