Skip to content

Commit 9532e7a

Browse files
committed
test(pty-list): fix assertion for multiline session output
Update the ptyList session info test to match the actual multiline output format produced by formatSessionInfo. Replaces the brittle single-line assertion for PID, line count, and workdir with three separate checks. This ensures the test matches formatted output and prevents future false negatives.
1 parent bb64537 commit 9532e7a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/pty-tools.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ describe('PTY Tools', () => {
236236
expect(result).toContain('[pty_123] Test Session')
237237
expect(result).toContain('Command: echo hello')
238238
expect(result).toContain('Status: running')
239-
expect(result).toContain('PID: 12345 | Lines: 10 | Workdir: /tmp')
239+
expect(result).toContain('PID: 12345')
240+
expect(result).toContain('Lines: 10')
241+
expect(result).toContain('Workdir: /tmp')
240242
expect(result).toContain('Total: 1 session(s)')
241243
expect(result).toContain('</pty_list>')
242244
})

0 commit comments

Comments
 (0)