summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-08-23 10:30:14 -0400
committerGitHub <noreply@github.com>2022-08-23 10:30:14 -0400
commit362af63c6f45e98948536d08d2d6195af87f729c (patch)
tree6fbef5a889147ca35439380960a83afa8fe39022 /cli/tests
parent86ef743c0fc266d4e6d86fd33da3f0ee983b4f19 (diff)
fix(cache): do not attempt to emit non-emitable files (#15562)
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
+ }
+}