summaryrefslogtreecommitdiff
path: root/cli/tests/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r--cli/tests/testdata/check/jsximportsource_importmap_config/deno.json7
-rw-r--r--cli/tests/testdata/check/jsximportsource_importmap_config/import_map.json5
-rw-r--r--cli/tests/testdata/check/jsximportsource_importmap_config/jsx_runtime.ts4
-rw-r--r--cli/tests/testdata/check/jsximportsource_importmap_config/main.bundle.js9
-rw-r--r--cli/tests/testdata/check/jsximportsource_importmap_config/main.tsx1
5 files changed, 26 insertions, 0 deletions
diff --git a/cli/tests/testdata/check/jsximportsource_importmap_config/deno.json b/cli/tests/testdata/check/jsximportsource_importmap_config/deno.json
new file mode 100644
index 000000000..6d837af7c
--- /dev/null
+++ b/cli/tests/testdata/check/jsximportsource_importmap_config/deno.json
@@ -0,0 +1,7 @@
+{
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "jsxImportSource": "jsx"
+ },
+ "importMap": "./import_map.json"
+}
diff --git a/cli/tests/testdata/check/jsximportsource_importmap_config/import_map.json b/cli/tests/testdata/check/jsximportsource_importmap_config/import_map.json
new file mode 100644
index 000000000..e926207af
--- /dev/null
+++ b/cli/tests/testdata/check/jsximportsource_importmap_config/import_map.json
@@ -0,0 +1,5 @@
+{
+ "imports": {
+ "jsx/jsx-runtime": "./jsx_runtime.ts"
+ }
+}
diff --git a/cli/tests/testdata/check/jsximportsource_importmap_config/jsx_runtime.ts b/cli/tests/testdata/check/jsximportsource_importmap_config/jsx_runtime.ts
new file mode 100644
index 000000000..33a07ca73
--- /dev/null
+++ b/cli/tests/testdata/check/jsximportsource_importmap_config/jsx_runtime.ts
@@ -0,0 +1,4 @@
+// deno-lint-ignore no-namespace
+export namespace JSX {
+ export type IntrinsicElements = { [key: string]: unknown };
+}
diff --git a/cli/tests/testdata/check/jsximportsource_importmap_config/main.bundle.js b/cli/tests/testdata/check/jsximportsource_importmap_config/main.bundle.js
new file mode 100644
index 000000000..6f39c876e
--- /dev/null
+++ b/cli/tests/testdata/check/jsximportsource_importmap_config/main.bundle.js
@@ -0,0 +1,9 @@
+// deno-fmt-ignore-file
+// deno-lint-ignore-file
+// This code was bundled using `deno bundle` and it's not recommended to edit it manually
+
+const makeParagraph = ()=>jsx("p", {
+ children: "A paragraph!"
+ });
+export { makeParagraph as makeParagraph };
+
diff --git a/cli/tests/testdata/check/jsximportsource_importmap_config/main.tsx b/cli/tests/testdata/check/jsximportsource_importmap_config/main.tsx
new file mode 100644
index 000000000..a1eb24f0b
--- /dev/null
+++ b/cli/tests/testdata/check/jsximportsource_importmap_config/main.tsx
@@ -0,0 +1 @@
+export const makeParagraph = () => <p>A paragraph!</p>;