diff --git a/packages/nx/src/executors/run-commands/run-commands.impl.spec.ts b/packages/nx/src/executors/run-commands/run-commands.impl.spec.ts index 95bfb5ab4d198..a5e5715455515 100644 --- a/packages/nx/src/executors/run-commands/run-commands.impl.spec.ts +++ b/packages/nx/src/executors/run-commands/run-commands.impl.spec.ts @@ -572,6 +572,7 @@ describe('Run Commands', () => { ...process.env, ...env(), }, + windowsHide: true, }); expect(exec).toHaveBeenNthCalledWith(2, `echo 'Hello Universe'`, { maxBuffer: LARGE_BUFFER, @@ -579,6 +580,7 @@ describe('Run Commands', () => { ...process.env, ...env(), }, + windowsHide: true, }); }); @@ -601,6 +603,7 @@ describe('Run Commands', () => { ...process.env, ...env(), }, + windowsHide: true, }); expect(exec).toHaveBeenNthCalledWith(2, `echo 'Hello Universe'`, { maxBuffer: LARGE_BUFFER, @@ -608,6 +611,7 @@ describe('Run Commands', () => { ...process.env, ...env(), }, + windowsHide: true, }); }); @@ -627,10 +631,12 @@ describe('Run Commands', () => { expect(exec).toHaveBeenNthCalledWith(1, `echo 'Hello World'`, { maxBuffer: LARGE_BUFFER, env: { ...process.env, FORCE_COLOR: `true`, ...env() }, + windowsHide: true, }); expect(exec).toHaveBeenNthCalledWith(2, `echo 'Hello Universe'`, { maxBuffer: LARGE_BUFFER, env: { ...process.env, FORCE_COLOR: `true`, ...env() }, + windowsHide: true, }); }); }); diff --git a/packages/nx/src/utils/git-utils.spec.ts b/packages/nx/src/utils/git-utils.spec.ts index 67bc43ad2b2fd..3ff74484e292e 100644 --- a/packages/nx/src/utils/git-utils.spec.ts +++ b/packages/nx/src/utils/git-utils.spec.ts @@ -21,7 +21,10 @@ describe('git utils tests', () => { const result = getGithubSlugOrNull(); expect(result).toBe('origin-user/repo-name'); - expect(execSync).toHaveBeenCalledWith('git remote -v', { stdio: 'pipe' }); + expect(execSync).toHaveBeenCalledWith('git remote -v', { + stdio: 'pipe', + windowsHide: true, + }); }); it('should return "github" if there are no remotes', () => { @@ -30,7 +33,10 @@ describe('git utils tests', () => { const result = getGithubSlugOrNull(); expect(result).toBe('github'); - expect(execSync).toHaveBeenCalledWith('git remote -v', { stdio: 'pipe' }); + expect(execSync).toHaveBeenCalledWith('git remote -v', { + stdio: 'pipe', + windowsHide: true, + }); }); it('should return "github" if execSync throws an error', () => { @@ -41,7 +47,10 @@ describe('git utils tests', () => { const result = getGithubSlugOrNull(); expect(result).toBe('github'); - expect(execSync).toHaveBeenCalledWith('git remote -v', { stdio: 'pipe' }); + expect(execSync).toHaveBeenCalledWith('git remote -v', { + stdio: 'pipe', + windowsHide: true, + }); }); it('should return the first github remote slug if no origin is present', () => { @@ -53,7 +62,10 @@ describe('git utils tests', () => { const result = getGithubSlugOrNull(); expect(result).toBe('upstream-user/repo-name'); - expect(execSync).toHaveBeenCalledWith('git remote -v', { stdio: 'pipe' }); + expect(execSync).toHaveBeenCalledWith('git remote -v', { + stdio: 'pipe', + windowsHide: true, + }); }); it('should return null if remote is set up but not github', () => { @@ -65,7 +77,10 @@ describe('git utils tests', () => { const result = getGithubSlugOrNull(); expect(result).toBeNull(); - expect(execSync).toHaveBeenCalledWith('git remote -v', { stdio: 'pipe' }); + expect(execSync).toHaveBeenCalledWith('git remote -v', { + stdio: 'pipe', + windowsHide: true, + }); }); it('should return the first github remote slug for HTTPS URLs', () => { @@ -77,7 +92,10 @@ describe('git utils tests', () => { const result = getGithubSlugOrNull(); expect(result).toBe('origin-user/repo-name'); - expect(execSync).toHaveBeenCalledWith('git remote -v', { stdio: 'pipe' }); + expect(execSync).toHaveBeenCalledWith('git remote -v', { + stdio: 'pipe', + windowsHide: true, + }); }); });