diff options
| author | Matt Mastracci <matthew@mastracci.com> | 2024-04-02 15:55:06 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-02 15:55:06 -0600 |
| commit | 3b9fd1af804e4fe534798ec2d7da440d97ba610c (patch) | |
| tree | 0719c35c46a4d1210dcb48f8b69304744ca2fcc0 /tests/testdata | |
| parent | cc4ede41a7d39e318d18d3bccf797d232a5b286a (diff) | |
fix(cli): Enforce a human delay in prompt to fix paste problem (#23184)
The permission prompt doesn't wait for quiescent input, so someone
pasting a large text file into the console may end up losing the prompt.
We enforce a minimum human delay and wait for a 100ms quiescent period
before we write and accept prompt input to avoid this problem.
This does require adding a human delay in all prompt tests, but that's
pretty straightforward. I rewrote the locked stdout/stderr test while I
was in here.
Diffstat (limited to 'tests/testdata')
| -rw-r--r-- | tests/testdata/run/stdio_streams_are_locked_in_permission_prompt/worker.js | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/testdata/run/stdio_streams_are_locked_in_permission_prompt/worker.js b/tests/testdata/run/stdio_streams_are_locked_in_permission_prompt/worker.js deleted file mode 100644 index 287027c83..000000000 --- a/tests/testdata/run/stdio_streams_are_locked_in_permission_prompt/worker.js +++ /dev/null @@ -1,3 +0,0 @@ -setTimeout(() => { - console.log("Are you sure you want to continue?"); -}, 10); // ensure we don't output too quickly before the permission prompt |
