summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/run_tests.rs6
-rw-r--r--cli/tests/testdata/config_json_import.ts2
-rw-r--r--cli/tests/testdata/config_json_import.ts.out3
-rw-r--r--cli/tests/testdata/jsx/deno-jsx.json6
4 files changed, 17 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index 7354dbf1d..adaa6d49d 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -2754,6 +2754,12 @@ itest!(custom_inspect_url {
output: "custom_inspect_url.js.out",
});
+itest!(config_json_import {
+ args: "run --quiet -c jsx/deno-jsx.json config_json_import.ts",
+ output: "config_json_import.ts.out",
+ http_server: true,
+});
+
#[test]
fn running_declaration_files() {
let temp_dir = TempDir::new();
diff --git a/cli/tests/testdata/config_json_import.ts b/cli/tests/testdata/config_json_import.ts
new file mode 100644
index 000000000..d344c0fb7
--- /dev/null
+++ b/cli/tests/testdata/config_json_import.ts
@@ -0,0 +1,2 @@
+import config from "./jsx/deno-jsx.json" assert { type: "json" };
+console.log(config);
diff --git a/cli/tests/testdata/config_json_import.ts.out b/cli/tests/testdata/config_json_import.ts.out
new file mode 100644
index 000000000..aa55be7d5
--- /dev/null
+++ b/cli/tests/testdata/config_json_import.ts.out
@@ -0,0 +1,3 @@
+{
+ compilerOptions: { jsx: "react-jsx", jsxImportSource: "http://localhost:4545/jsx" }
+}
diff --git a/cli/tests/testdata/jsx/deno-jsx.json b/cli/tests/testdata/jsx/deno-jsx.json
new file mode 100644
index 000000000..311409ea3
--- /dev/null
+++ b/cli/tests/testdata/jsx/deno-jsx.json
@@ -0,0 +1,6 @@
+{
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "jsxImportSource": "http://localhost:4545/jsx"
+ }
+}