diff --git a/cli/emit.rs b/cli/emit.rs index f96b8484b0..0ba7ccf08c 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 3dd6269098..f4caacd6f0 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 0000000000..7ef04d829f --- /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 0000000000..aee8a64d48 --- /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 0000000000..4a1c3463fa --- /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"); + } + }, +});