Skip to content

Commit

Permalink
Merge 00ea50d into b3f78ed
Browse files Browse the repository at this point in the history
  • Loading branch information
connectdotz committed Jan 13, 2024
2 parents b3f78ed + 00ea50d commit 12e1b28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/JestExt/run-shell.ts
Expand Up @@ -41,7 +41,7 @@ export class RunShell {
this.nonLoginShell = setting;
this.loginShell = this.getLoginShell(setting);
} else {
if (setting.args.length > 0) {
if (setting.args?.length > 0) {
this._useLoginShell = true;
this.nonLoginShell = undefined;
this.loginShell = setting;
Expand Down
1 change: 1 addition & 0 deletions tests/JestExt/run-shell.test.ts
Expand Up @@ -30,6 +30,7 @@ describe('RunnerShell', () => {
${6} | ${'darwin'} | ${{ path: 'bash', args: ['--login'] }} | ${{ path: 'bash', args: ['--login'] }} | ${true} | ${undefined}
${7} | ${'linux'} | ${undefined} | ${LoginShells.sh} | ${false} | ${undefined}
${8} | ${'linux'} | ${'whatever'} | ${undefined} | ${'never'} | ${undefined}
${9} | ${'darwin'} | ${{ path: '/bin/zsh' }} | ${LoginShells.zsh} | ${false} | ${'/bin/zsh'}
`('case $case', ({ platform, setting, loginShell, settingOverride, useLoginShell }) => {
jest.clearAllMocks();
mockPlatform.mockReturnValue(platform);
Expand Down

0 comments on commit 12e1b28

Please sign in to comment.