Skip to content

Commit

Permalink
check readable side
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyzha0 committed Oct 25, 2024
1 parent 28dc611 commit 2a8829b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ describe(
command: '/bin/sh',
args: [
'-c',
`seq 0 ${n} && sleep 0.1`
`seq 0 ${n}`
],
onExit,
});
Expand All @@ -305,8 +305,10 @@ describe(
buffer = Buffer.concat([buffer, data]);
});


await vi.waitFor(() => expect(onExit).toHaveBeenCalledTimes(1));
expect(onExit).toHaveBeenCalledWith(null, 0);
expect(readStream.readableEnded).toBe(true);

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

View workflow job for this annotation

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

tests/index.test.ts > PTY > ordering is correct

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ tests/index.test.ts:311:42

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

View workflow job for this annotation

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

tests/index.test.ts > PTY > ordering is correct

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ tests/index.test.ts:311:42

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

View workflow job for this annotation

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

tests/index.test.ts > PTY > ordering is correct

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ tests/index.test.ts:311:42

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

View workflow job for this annotation

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

tests/index.test.ts > PTY > ordering is correct

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ tests/index.test.ts:311:42

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

View workflow job for this annotation

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

tests/index.test.ts > PTY > ordering is correct

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ tests/index.test.ts:311:42

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

View workflow job for this annotation

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

tests/index.test.ts > PTY > ordering is correct

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ tests/index.test.ts:311:42

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

View workflow job for this annotation

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

tests/index.test.ts > PTY > ordering is correct

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ tests/index.test.ts:311:42

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

View workflow job for this annotation

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

tests/index.test.ts > PTY > ordering is correct

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ tests/index.test.ts:311:42

const lines = buffer.toString().trim().split('\n');
expect(lines.length).toBe(n + 1);

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

View workflow job for this annotation

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

tests/index.test.ts > PTY > ordering is correct

AssertionError: expected 841 to be 1025 // Object.is equality - Expected + Received - 1025 + 841 ❯ tests/index.test.ts:314:30

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

View workflow job for this annotation

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

tests/index.test.ts > PTY > ordering is correct

AssertionError: expected 841 to be 1025 // Object.is equality - Expected + Received - 1025 + 841 ❯ tests/index.test.ts:314:30
Expand All @@ -318,7 +320,7 @@ describe(
}
);

test.only('doesnt miss large output from fast commands', async () => {
test('doesnt miss large output from fast commands', async () => {
const payload = `hello`.repeat(4096);
let buffer = Buffer.from('');
const onExit = vi.fn();
Expand Down

0 comments on commit 2a8829b

Please sign in to comment.