summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/publish_tests.rs11
-rw-r--r--cli/tests/testdata/publish/node_specifier.out8
-rw-r--r--cli/tests/testdata/publish/node_specifier/deno.json7
-rw-r--r--cli/tests/testdata/publish/node_specifier/mod.ts5
4 files changed, 31 insertions, 0 deletions
diff --git a/cli/tests/integration/publish_tests.rs b/cli/tests/integration/publish_tests.rs
index 6b6fac70d..dbbbe1912 100644
--- a/cli/tests/integration/publish_tests.rs
+++ b/cli/tests/integration/publish_tests.rs
@@ -101,6 +101,17 @@ itest!(successful {
http_server: true,
});
+itest!(node_specifier {
+ args: "publish --token 'sadfasdf'",
+ output: "publish/node_specifier.out",
+ cwd: Some("publish/node_specifier"),
+ envs: env_vars_for_registry()
+ .into_iter()
+ .chain(env_vars_for_npm_tests().into_iter())
+ .collect(),
+ http_server: true,
+});
+
itest!(config_file_jsonc {
args: "publish --token 'sadfasdf'",
output: "publish/deno_jsonc.out",
diff --git a/cli/tests/testdata/publish/node_specifier.out b/cli/tests/testdata/publish/node_specifier.out
new file mode 100644
index 000000000..7acb5b5ba
--- /dev/null
+++ b/cli/tests/testdata/publish/node_specifier.out
@@ -0,0 +1,8 @@
+Checking fast check type graph for errors...
+Ensuring type checks...
+Download http://localhost:4545/npm/registry/@types/node
+Download http://localhost:4545/npm/registry/@types/node/node-[WILDCARD].tgz
+Check file:///[WILDCARD]/publish/node_specifier/mod.ts
+Publishing @foo/bar@1.0.0 ...
+Successfully published @foo/bar@1.0.0
+Visit http://127.0.0.1:4250/@foo/bar@1.0.0 for details
diff --git a/cli/tests/testdata/publish/node_specifier/deno.json b/cli/tests/testdata/publish/node_specifier/deno.json
new file mode 100644
index 000000000..213a7cec6
--- /dev/null
+++ b/cli/tests/testdata/publish/node_specifier/deno.json
@@ -0,0 +1,7 @@
+{
+ "name": "@foo/bar",
+ "version": "1.0.0",
+ "exports": {
+ ".": "./mod.ts"
+ }
+}
diff --git a/cli/tests/testdata/publish/node_specifier/mod.ts b/cli/tests/testdata/publish/node_specifier/mod.ts
new file mode 100644
index 000000000..9d8263709
--- /dev/null
+++ b/cli/tests/testdata/publish/node_specifier/mod.ts
@@ -0,0 +1,5 @@
+import "node:http";
+
+export function foobar(): string {
+ return "string";
+}