1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

fix(cli): unset jsxFragmentFactory & jsxFactory options (#15264)

This commit is contained in:
Satya Rohith 2022-07-21 14:44:18 +05:30 committed by GitHub
parent e98e0da8b2
commit 6c3d9b981f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 2 deletions

View file

@ -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,

View file

@ -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()

View file

@ -0,0 +1,6 @@
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "https://esm.sh/react@18.1.0"
}
}

View file

@ -0,0 +1,5 @@
running 1 test from ./test/hello_world.ts
hello world test ... ok ([WILDCARD])
ok | 1 passed | 0 failed ([WILDCARD])

View file

@ -0,0 +1,9 @@
Deno.test({
name: "hello world test",
fn(): void {
const world = "world";
if ("world" !== world) {
throw new Error("world !== world");
}
},
});