summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/cache_tests.rs5
-rw-r--r--cli/tests/testdata/cache/json_import/main.ts2
-rw-r--r--cli/tests/testdata/cache/json_import/test.json5
3 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/integration/cache_tests.rs b/cli/tests/integration/cache_tests.rs
index aaae62531..54aea8106 100644
--- a/cli/tests/integration/cache_tests.rs
+++ b/cli/tests/integration/cache_tests.rs
@@ -92,3 +92,8 @@ itest!(check_local_by_default2 {
output: "cache/check_local_by_default2.out",
http_server: true,
});
+
+itest!(json_import {
+ // should not error
+ args: "cache --quiet cache/json_import/main.ts",
+});
diff --git a/cli/tests/testdata/cache/json_import/main.ts b/cli/tests/testdata/cache/json_import/main.ts
new file mode 100644
index 000000000..78273558f
--- /dev/null
+++ b/cli/tests/testdata/cache/json_import/main.ts
@@ -0,0 +1,2 @@
+import asdf from "./test.json" assert { type: "json" };
+console.log(asdf);
diff --git a/cli/tests/testdata/cache/json_import/test.json b/cli/tests/testdata/cache/json_import/test.json
new file mode 100644
index 000000000..258849a68
--- /dev/null
+++ b/cli/tests/testdata/cache/json_import/test.json
@@ -0,0 +1,5 @@
+{
+ "foo": {
+ "bar": 1
+ }
+}