summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/emit.rs2
-rw-r--r--cli/tests/integration/test_tests.rs6
-rw-r--r--cli/tests/testdata/test/deno_custom_jsx.json6
-rw-r--r--cli/tests/testdata/test/hello_world.out5
-rw-r--r--cli/tests/testdata/test/hello_world.ts9
5 files changed, 26 insertions, 2 deletions
diff --git a/cli/emit.rs b/cli/emit.rs
index f96b8484b..0ba7ccf08 100644
--- a/cli/emit.rs
+++ b/cli/emit.rs
@@ -153,8 +153,6 @@ pub fn get_ts_config_for_emit(
"experimentalDecorators": true,
"incremental": true,
"jsx": "react",
- "jsxFactory": "React.createElement",
- "jsxFragmentFactory": "React.Fragment",
"importsNotUsedAsValues": "remove",
"inlineSourceMap": true,
"inlineSources": true,
diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs
index 3dd626909..f4caacd6f 100644
--- a/cli/tests/integration/test_tests.rs
+++ b/cli/tests/integration/test_tests.rs
@@ -346,6 +346,12 @@ itest!(no_prompt_with_denied_perms {
output: "test/no_prompt_with_denied_perms.out",
});
+itest!(test_with_custom_jsx {
+ args: "test --quiet --allow-read test/hello_world.ts --config=test/deno_custom_jsx.json",
+ exit_code: 0,
+ output: "test/hello_world.out",
+});
+
#[test]
fn captured_output() {
let output = util::deno_cmd()
diff --git a/cli/tests/testdata/test/deno_custom_jsx.json b/cli/tests/testdata/test/deno_custom_jsx.json
new file mode 100644
index 000000000..7ef04d829
--- /dev/null
+++ b/cli/tests/testdata/test/deno_custom_jsx.json
@@ -0,0 +1,6 @@
+{
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "jsxImportSource": "https://esm.sh/react@18.1.0"
+ }
+}
diff --git a/cli/tests/testdata/test/hello_world.out b/cli/tests/testdata/test/hello_world.out
new file mode 100644
index 000000000..aee8a64d4
--- /dev/null
+++ b/cli/tests/testdata/test/hello_world.out
@@ -0,0 +1,5 @@
+running 1 test from ./test/hello_world.ts
+hello world test ... ok ([WILDCARD])
+
+ok | 1 passed | 0 failed ([WILDCARD])
+
diff --git a/cli/tests/testdata/test/hello_world.ts b/cli/tests/testdata/test/hello_world.ts
new file mode 100644
index 000000000..4a1c3463f
--- /dev/null
+++ b/cli/tests/testdata/test/hello_world.ts
@@ -0,0 +1,9 @@
+Deno.test({
+ name: "hello world test",
+ fn(): void {
+ const world = "world";
+ if ("world" !== world) {
+ throw new Error("world !== world");
+ }
+ },
+});