mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
fix(cli): unset jsxFragmentFactory & jsxFactory options (#15264)
This commit is contained in:
parent
e98e0da8b2
commit
6c3d9b981f
5 changed files with 26 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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()
|
||||
|
|
6
cli/tests/testdata/test/deno_custom_jsx.json
vendored
Normal file
6
cli/tests/testdata/test/deno_custom_jsx.json
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "https://esm.sh/react@18.1.0"
|
||||
}
|
||||
}
|
5
cli/tests/testdata/test/hello_world.out
vendored
Normal file
5
cli/tests/testdata/test/hello_world.out
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
running 1 test from ./test/hello_world.ts
|
||||
hello world test ... ok ([WILDCARD])
|
||||
|
||||
ok | 1 passed | 0 failed ([WILDCARD])
|
||||
|
9
cli/tests/testdata/test/hello_world.ts
vendored
Normal file
9
cli/tests/testdata/test/hello_world.ts
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
Deno.test({
|
||||
name: "hello world test",
|
||||
fn(): void {
|
||||
const world = "world";
|
||||
if ("world" !== world) {
|
||||
throw new Error("world !== world");
|
||||
}
|
||||
},
|
||||
});
|
Loading…
Reference in a new issue