summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/jsx
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/jsx')
-rw-r--r--cli/tests/testdata/jsx/deno-jsx-import-map.jsonc6
-rw-r--r--cli/tests/testdata/jsx/deno-jsx.jsonc6
-rw-r--r--cli/tests/testdata/jsx/deno-jsxdev-import-map.jsonc6
-rw-r--r--cli/tests/testdata/jsx/deno-jsxdev.jsonc6
-rw-r--r--cli/tests/testdata/jsx/import-map.json6
-rw-r--r--cli/tests/testdata/jsx/jsx-dev-runtime/index.ts12
-rw-r--r--cli/tests/testdata/jsx/jsx-runtime/index.ts12
7 files changed, 54 insertions, 0 deletions
diff --git a/cli/tests/testdata/jsx/deno-jsx-import-map.jsonc b/cli/tests/testdata/jsx/deno-jsx-import-map.jsonc
new file mode 100644
index 000000000..5adbfa8b5
--- /dev/null
+++ b/cli/tests/testdata/jsx/deno-jsx-import-map.jsonc
@@ -0,0 +1,6 @@
+{
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "jsxImportSource": "jsx"
+ }
+}
diff --git a/cli/tests/testdata/jsx/deno-jsx.jsonc b/cli/tests/testdata/jsx/deno-jsx.jsonc
new file mode 100644
index 000000000..311409ea3
--- /dev/null
+++ b/cli/tests/testdata/jsx/deno-jsx.jsonc
@@ -0,0 +1,6 @@
+{
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "jsxImportSource": "http://localhost:4545/jsx"
+ }
+}
diff --git a/cli/tests/testdata/jsx/deno-jsxdev-import-map.jsonc b/cli/tests/testdata/jsx/deno-jsxdev-import-map.jsonc
new file mode 100644
index 000000000..7481d5a2d
--- /dev/null
+++ b/cli/tests/testdata/jsx/deno-jsxdev-import-map.jsonc
@@ -0,0 +1,6 @@
+{
+ "compilerOptions": {
+ "jsx": "react-jsxdev",
+ "jsxImportSource": "jsx"
+ }
+}
diff --git a/cli/tests/testdata/jsx/deno-jsxdev.jsonc b/cli/tests/testdata/jsx/deno-jsxdev.jsonc
new file mode 100644
index 000000000..ae5bdf9f1
--- /dev/null
+++ b/cli/tests/testdata/jsx/deno-jsxdev.jsonc
@@ -0,0 +1,6 @@
+{
+ "compilerOptions": {
+ "jsx": "react-jsxdev",
+ "jsxImportSource": "http://localhost:4545/jsx"
+ }
+}
diff --git a/cli/tests/testdata/jsx/import-map.json b/cli/tests/testdata/jsx/import-map.json
new file mode 100644
index 000000000..baab76f20
--- /dev/null
+++ b/cli/tests/testdata/jsx/import-map.json
@@ -0,0 +1,6 @@
+{
+ "imports": {
+ "jsx/jsx-runtime": "http://localhost:4545/jsx/jsx-runtime/index.ts",
+ "jsx/jsx-dev-runtime": "http://localhost:4545/jsx/jsx-dev-runtime/index.ts"
+ }
+}
diff --git a/cli/tests/testdata/jsx/jsx-dev-runtime/index.ts b/cli/tests/testdata/jsx/jsx-dev-runtime/index.ts
new file mode 100644
index 000000000..15e2029c8
--- /dev/null
+++ b/cli/tests/testdata/jsx/jsx-dev-runtime/index.ts
@@ -0,0 +1,12 @@
+// deno-lint-ignore-file no-explicit-any
+export function jsx(
+ _type: any,
+ _props: any,
+ _key: any,
+ _source: any,
+ _self: any,
+) {}
+export const jsxs = jsx;
+export const jsxDEV = jsx;
+export const Fragment = Symbol("Fragment");
+console.log("imported", import.meta.url);
diff --git a/cli/tests/testdata/jsx/jsx-runtime/index.ts b/cli/tests/testdata/jsx/jsx-runtime/index.ts
new file mode 100644
index 000000000..15e2029c8
--- /dev/null
+++ b/cli/tests/testdata/jsx/jsx-runtime/index.ts
@@ -0,0 +1,12 @@
+// deno-lint-ignore-file no-explicit-any
+export function jsx(
+ _type: any,
+ _props: any,
+ _key: any,
+ _source: any,
+ _self: any,
+) {}
+export const jsxs = jsx;
+export const jsxDEV = jsx;
+export const Fragment = Symbol("Fragment");
+console.log("imported", import.meta.url);