From ce3a18a1287f764cd17671845f3f8d2827f723df Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Fri, 16 Oct 2026 08:03:37 -0700 Subject: [PATCH] test: detect quarantined input forwarded with provenance (#29715) Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> --- .../pty-connection-terminal-input-gating.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/components/terminal-pane/pty-connection-terminal-input-gating.spec.ts b/src/renderer/src/components/terminal-pane/pty-connection-terminal-input-gating.spec.ts index 810d4eda61e..088ccf69533 100644 --- a/src/renderer/src/components/terminal-pane/pty-connection-terminal-input-gating.spec.ts +++ b/src/renderer/src/components/terminal-pane/pty-connection-terminal-input-gating.spec.ts @@ -751,12 +751,12 @@ export function registerPtyConnectionTerminalInputGatingTests(): void { // The surviving tail of `echo hi; rm -rf x`: reaching the fresh shell would // let the user's own Enter run `rm -rf x` (#10065 follow-up). sendTerminalInputThroughPane(pane, 'cho hi; rm -rf x') - expect(transport.sendInput).not.toHaveBeenCalledWith('cho hi; rm -rf x') + expect(transport.sendInput.mock.calls.map(([data]) => data)).not.toContain('cho hi; rm -rf x') // A program that queries during reattach hangs if its reply is dropped. sendTerminalInputThroughPane(pane, '\x1b[3;1R') expect(transport.sendInputImmediate).toHaveBeenCalledWith('\x1b[3;1R') sendTerminalInputThroughPane(pane, '\r') - expect(transport.sendInput).not.toHaveBeenCalledWith('\r') + expect(transport.sendInput.mock.calls.map(([data]) => data)).not.toContain('\r') // The terminator disarmed it, so the next real command reaches the shell. sendTerminalInputThroughPane(pane, 'ls\r') expect(transport.sendInput).toHaveBeenCalledWith('ls\r', 'query-reply')