summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/run_tests.rs9
-rw-r--r--cli/tests/testdata/run/066_prompt.ts4
2 files changed, 2 insertions, 11 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index 36eee1100..2a349a5f2 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -2823,12 +2823,10 @@ mod permissions {
.new_command()
.args_vec(["run", "--quiet", "--unstable", "run/066_prompt.ts"])
.with_pty(|mut console| {
- console.expect("What is your name? [Jane Doe] ");
- console.write_line_raw("John Doe");
- console.expect("Your name is John Doe.");
- console.expect("What is your name? [Jane Doe] ");
+ console.expect("What is your name? Jane Doe");
console.write_line_raw("");
console.expect("Your name is Jane Doe.");
+
console.expect("Prompt ");
console.write_line_raw("foo");
console.expect("Your input is foo.");
@@ -2852,9 +2850,6 @@ mod permissions {
console.expect("Alert [Enter] ");
console.write_line("");
console.expect("The end of test");
- console.expect("What is EOF? ");
- console.write_line("");
- console.expect("Your answer is null");
});
}
diff --git a/cli/tests/testdata/run/066_prompt.ts b/cli/tests/testdata/run/066_prompt.ts
index e3daa7ac0..f059be685 100644
--- a/cli/tests/testdata/run/066_prompt.ts
+++ b/cli/tests/testdata/run/066_prompt.ts
@@ -1,5 +1,3 @@
-const name0 = prompt("What is your name?", "Jane Doe"); // Answer John Doe
-console.log(`Your name is ${name0}.`);
const name1 = prompt("What is your name?", "Jane Doe"); // Answer with default
console.log(`Your name is ${name1}.`);
const input = prompt(); // Answer foo
@@ -17,5 +15,3 @@ console.log(`Your answer is ${JSON.stringify(windows)}`);
alert("Hi");
alert();
console.log("The end of test");
-const eof = prompt("What is EOF?");
-console.log(`Your answer is ${JSON.stringify(eof)}`);