Skip to content

Commit

Permalink
Merge 2fbb35e into 9ce5948
Browse files Browse the repository at this point in the history
  • Loading branch information
connectdotz committed Dec 13, 2023
2 parents 9ce5948 + 2fbb35e commit 3c599a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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
3 changes: 2 additions & 1 deletion tests/JestExt/run-shell.test.ts
Expand Up @@ -17,7 +17,7 @@ describe('RunnerShell', () => {
console.error = jest.fn();
console.warn = jest.fn();
});
beforeEach(() => {});
beforeEach(() => { });

describe('can initialize from a shell setting', () => {
it.each`
Expand All @@ -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 3c599a4

Please sign in to comment.