Skip to content

Commit

Permalink
echo with -n
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Oct 24, 2024
1 parent 3c2c102 commit 272d0a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check failure on line 344 in tests/index.test.ts

View workflow job for this annotation

GitHub Actions / Build and test on x86_64-unknown-linux-gnu

Unhandled error

AssertionError: expected 16383 to be 20480 // Object.is equality - Expected + Received - 20480 + 16383 ❯ onExit tests/index.test.ts:344:48 ❯ wrapper.ts:89:9 This error originated in "tests/index.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. The latest test that might've caused the error is "doesnt miss large output from fast commands". It might mean one of the following: - The error was thrown, while Vitest was running this test. - If the error occurred after the test had been completed, this was the last documented test before it was thrown.
done();
},
Expand Down

0 comments on commit 272d0a1

Please sign in to comment.