diff --git a/tests/index.test.ts b/tests/index.test.ts index 00f5290..683e10a 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -332,14 +332,15 @@ describe( const payload = `hello`.repeat(4096); let buffer = Buffer.from(''); const pty = new Pty({ - command: '/bin/sh', + command: '/bin/echo', args: [ - '-c', - `echo ${payload}`, + '-n', + payload ], onExit: (err, exitCode) => { expect(err).toBeNull(); expect(exitCode).toBe(0); + // account for the newline expect(buffer.toString().length).toBe(payload.length); done(); },