Skip to content

Commit 61bddfa

Browse files
committed
Fix test
1 parent 8e42076 commit 61bddfa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/src/util/__tests__/runSshCommand.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ describe('runSshCommand', () => {
3131
expect(returned).toBe(stdout);
3232
});
3333

34-
it('should throw first line of stderr on error', async () => {
35-
const stdErrFirstLine = 'mocked stderr content';
34+
it('should throw stderr on error', async () => {
35+
const stderrContent = 'mocked stderr content\nanother second line';
3636
mockedExeca.mockImplementationOnce(async () => {
3737
throw {
38-
stderr: `${stdErrFirstLine}\nanother second line`,
38+
stderr: stderrContent,
3939
};
4040
});
4141
try {
@@ -44,7 +44,7 @@ describe('runSshCommand', () => {
4444
identity: './identity/path',
4545
});
4646
} catch (err) {
47-
expect(err).toBe(stdErrFirstLine);
47+
expect(err).toBe(stderrContent);
4848
}
4949
});
5050
});

0 commit comments

Comments
 (0)