summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-03-07 11:30:30 -0500
committerGitHub <noreply@github.com>2024-03-07 17:30:30 +0100
commit594d8397ad46a90389bec9a76afde1bc7f1fa35b (patch)
tree9238e775513197042429fd9340cdc9bf792e7cd7 /tests
parent87a08fc3b2d0ed1e5a197628fa7091cb656c9058 (diff)
fix(publish): properly display graph validation errors (#22775)
The graph validation errors were displaying cryptically during publish. This fixes that.
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/publish_tests.rs9
-rw-r--r--tests/testdata/publish/sloppy_imports_not_enabled.out2
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/integration/publish_tests.rs b/tests/integration/publish_tests.rs
index ce93ccda3..cb1072bc0 100644
--- a/tests/integration/publish_tests.rs
+++ b/tests/integration/publish_tests.rs
@@ -275,6 +275,15 @@ itest!(sloppy_imports {
http_server: true,
});
+itest!(sloppy_imports_not_enabled {
+ args: "publish --token 'sadfasdf' --dry-run",
+ output: "publish/sloppy_imports_not_enabled.out",
+ cwd: Some("publish/sloppy_imports"),
+ envs: env_vars_for_jsr_tests(),
+ http_server: true,
+ exit_code: 1,
+});
+
itest!(sloppy_imports_no_warnings {
args: "publish --token 'sadfasdf' --dry-run --unstable-sloppy-imports",
output: "publish/sloppy_imports_no_warnings.out",
diff --git a/tests/testdata/publish/sloppy_imports_not_enabled.out b/tests/testdata/publish/sloppy_imports_not_enabled.out
new file mode 100644
index 000000000..c2f74ad2c
--- /dev/null
+++ b/tests/testdata/publish/sloppy_imports_not_enabled.out
@@ -0,0 +1,2 @@
+error: [WILDCARD] Maybe specify path to 'index.ts' file in directory instead or run with --unstable-sloppy-imports
+ at file:///[WILDCARD]/sloppy_imports/mod.ts:1:20