summaryrefslogtreecommitdiff
path: root/tests/specs/publish/node_specifier
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-04-29 10:08:27 -0400
committerGitHub <noreply@github.com>2024-04-29 10:08:27 -0400
commitda52058a945999d486b07700d2834f027a65947c (patch)
treeb6031c274cbc36dcefc6d681473e366cdb208c89 /tests/specs/publish/node_specifier
parentb02ffec37c73be8a73b95b33b32efa693e84e01b (diff)
chore: migrate bench, publish, and more itests to spec tests (#23584)
Diffstat (limited to 'tests/specs/publish/node_specifier')
-rw-r--r--tests/specs/publish/node_specifier/__test__.jsonc4
-rw-r--r--tests/specs/publish/node_specifier/deno.json7
-rw-r--r--tests/specs/publish/node_specifier/mod.ts5
-rw-r--r--tests/specs/publish/node_specifier/node_specifier.out8
4 files changed, 24 insertions, 0 deletions
diff --git a/tests/specs/publish/node_specifier/__test__.jsonc b/tests/specs/publish/node_specifier/__test__.jsonc
new file mode 100644
index 000000000..f845f2479
--- /dev/null
+++ b/tests/specs/publish/node_specifier/__test__.jsonc
@@ -0,0 +1,4 @@
+{
+ "args": "publish --token 'sadfasdf'",
+ "output": "node_specifier.out"
+}
diff --git a/tests/specs/publish/node_specifier/deno.json b/tests/specs/publish/node_specifier/deno.json
new file mode 100644
index 000000000..213a7cec6
--- /dev/null
+++ b/tests/specs/publish/node_specifier/deno.json
@@ -0,0 +1,7 @@
+{
+ "name": "@foo/bar",
+ "version": "1.0.0",
+ "exports": {
+ ".": "./mod.ts"
+ }
+}
diff --git a/tests/specs/publish/node_specifier/mod.ts b/tests/specs/publish/node_specifier/mod.ts
new file mode 100644
index 000000000..9d8263709
--- /dev/null
+++ b/tests/specs/publish/node_specifier/mod.ts
@@ -0,0 +1,5 @@
+import "node:http";
+
+export function foobar(): string {
+ return "string";
+}
diff --git a/tests/specs/publish/node_specifier/node_specifier.out b/tests/specs/publish/node_specifier/node_specifier.out
new file mode 100644
index 000000000..d3e4a367b
--- /dev/null
+++ b/tests/specs/publish/node_specifier/node_specifier.out
@@ -0,0 +1,8 @@
+Download http://localhost:4545/npm/registry/@types/node
+Download http://localhost:4545/npm/registry/@types/node/node-[WILDCARD].tgz
+Check file:///[WILDCARD]/mod.ts
+Checking for slow types in the public API...
+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