From 988eeaa535cdf46c68d2b540dd21aa3529437dfa Mon Sep 17 00:00:00 2001 From: prklm10 Date: Thu, 19 Oct 2023 12:00:25 +0530 Subject: [PATCH] tests for exec --- packages/cli-exec/test/exec.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli-exec/test/exec.test.js b/packages/cli-exec/test/exec.test.js index ca804f44f..26cfc89c2 100644 --- a/packages/cli-exec/test/exec.test.js +++ b/packages/cli-exec/test/exec.test.js @@ -131,7 +131,7 @@ describe('percy exec', () => { }); it('tests process.stdout', async () => { - let stdoutSpy = spyOn(process.stdout, 'write').and.resolveTo('some response') + let stdoutSpy = spyOn(process.stdout, 'write').and.resolveTo('some response'); await exec(['--', 'echo', 'Hi!']); expect(stdoutSpy).toHaveBeenCalled(); @@ -144,11 +144,11 @@ describe('percy exec', () => { }); it('tests process.stderr', async () => { - let stderrSpy = spyOn(process.stderr, 'write').and.resolveTo('some response') + let stderrSpy = spyOn(process.stderr, 'write').and.resolveTo('some response'); await expectAsync( exec(['--', 'node', 'random.js']) // invalid command ).toBeRejectedWithError('EEXIT: 1'); - + expect(stderrSpy).toHaveBeenCalled(); expect(logger.stderr).toEqual([]); expect(logger.stdout).toEqual([