diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/046_jsx_test.tsx | 9 | ||||
-rw-r--r-- | cli/tests/046_jsx_test.tsx.out | 1 | ||||
-rw-r--r-- | cli/tests/047_jsx_test.jsx | 9 | ||||
-rw-r--r-- | cli/tests/047_jsx_test.jsx.out | 1 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 10 |
5 files changed, 30 insertions, 0 deletions
diff --git a/cli/tests/046_jsx_test.tsx b/cli/tests/046_jsx_test.tsx new file mode 100644 index 000000000..4e9380eb8 --- /dev/null +++ b/cli/tests/046_jsx_test.tsx @@ -0,0 +1,9 @@ +const React = { + createElement(factory: any, props: any, ...children: any[]) { + return {factory, props, children} + } +} +const View = () => ( + <div class="deno">land</div> +) +console.log(<View />) diff --git a/cli/tests/046_jsx_test.tsx.out b/cli/tests/046_jsx_test.tsx.out new file mode 100644 index 000000000..85cfe824b --- /dev/null +++ b/cli/tests/046_jsx_test.tsx.out @@ -0,0 +1 @@ +{ factory: [Function: View], props: null, children: [] } diff --git a/cli/tests/047_jsx_test.jsx b/cli/tests/047_jsx_test.jsx new file mode 100644 index 000000000..553c4c5a5 --- /dev/null +++ b/cli/tests/047_jsx_test.jsx @@ -0,0 +1,9 @@ +const React = { + createElement(factory, props, ...children) { + return {factory, props, children} + } +} +const View = () => ( + <div class="deno">land</div> +) +console.log(<View />) diff --git a/cli/tests/047_jsx_test.jsx.out b/cli/tests/047_jsx_test.jsx.out new file mode 100644 index 000000000..85cfe824b --- /dev/null +++ b/cli/tests/047_jsx_test.jsx.out @@ -0,0 +1 @@ +{ factory: [Function: View], props: null, children: [] } diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 0e0407180..930ad9477 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -322,6 +322,16 @@ itest!(_045_proxy { output: "045_proxy_test.ts.out", }); +itest!(_046_tsx { + args: "run --reload 046_jsx_test.tsx", + output: "046_jsx_test.tsx.out", +}); + +itest!(_047_jsx { + args: "run --reload 047_jsx_test.jsx", + output: "047_jsx_test.jsx.out", +}); + itest!(async_error { exit_code: 1, args: "run --reload async_error.ts", |