Skip to content

Commit

Permalink
tests for exec
Browse files Browse the repository at this point in the history
  • Loading branch information
prklm10 committed Oct 19, 2023
1 parent f757ae1 commit 988eeaa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cli-exec/test/exec.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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([
Expand Down

0 comments on commit 988eeaa

Please sign in to comment.