summaryrefslogtreecommitdiff
path: root/cli/tests/integration/repl_tests.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-11-01 19:04:54 -0400
committerGitHub <noreply@github.com>2023-11-01 23:04:54 +0000
commit58d543a480463ed24de77ec155f1d7e87bb7b234 (patch)
treeeffd93acd92a5bfe2a3422ecc30c3119d61bca14 /cli/tests/integration/repl_tests.rs
parentab72019a17ccc077384c37eaeae15fffc9ce4d92 (diff)
fix(repl): jsxImportSource was not working (#21049)
I made some fixes in deno_ast to make this possible and we forgot to update this.
Diffstat (limited to 'cli/tests/integration/repl_tests.rs')
-rw-r--r--cli/tests/integration/repl_tests.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/cli/tests/integration/repl_tests.rs b/cli/tests/integration/repl_tests.rs
index fe075d37c..c161477d5 100644
--- a/cli/tests/integration/repl_tests.rs
+++ b/cli/tests/integration/repl_tests.rs
@@ -505,6 +505,23 @@ fn jsx_errors_without_pragma() {
}
#[test]
+fn jsx_import_source() {
+ let context = TestContextBuilder::default()
+ .use_temp_cwd()
+ .use_http_server()
+ .build();
+ context
+ .new_command()
+ .args_vec(["repl", "-A"])
+ .with_pty(|mut console| {
+ console.write_line("/** @jsxImportSource http://localhost:4545/jsx */");
+ console.expect("undefined");
+ console.write_line("const element = <div />;");
+ console.expect("undefined");
+ });
+}
+
+#[test]
fn type_error() {
util::with_pty(&["repl"], |mut console| {
console.write_line("console()");