summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/integration/npm_tests.rs7
-rw-r--r--cli/tests/testdata/npm/deno_run_esm.out4
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/cjs-local-global-decls/1.0.0/package.json2
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/esm-bin/1.0.0/cli.mjs5
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/esm-bin/1.0.0/package.json5
5 files changed, 22 insertions, 1 deletions
diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs
index c46f8e92b..582284c36 100644
--- a/cli/tests/integration/npm_tests.rs
+++ b/cli/tests/integration/npm_tests.rs
@@ -226,6 +226,13 @@ itest!(deno_run_cowthink {
http_server: true,
});
+itest!(deno_run_esm_module {
+ args: "run --unstable -A --quiet npm:@denotest/esm-bin this is a test",
+ output: "npm/deno_run_esm.out",
+ envs: env_vars(),
+ http_server: true,
+});
+
itest!(deno_run_non_existent {
args: "run --unstable npm:mkdirp@0.5.125",
output: "npm/deno_run_non_existent.out",
diff --git a/cli/tests/testdata/npm/deno_run_esm.out b/cli/tests/testdata/npm/deno_run_esm.out
new file mode 100644
index 000000000..ffe7cbd89
--- /dev/null
+++ b/cli/tests/testdata/npm/deno_run_esm.out
@@ -0,0 +1,4 @@
+this
+is
+a
+test
diff --git a/cli/tests/testdata/npm/registry/@denotest/cjs-local-global-decls/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/cjs-local-global-decls/1.0.0/package.json
index f3514e2ab..b151deaf6 100644
--- a/cli/tests/testdata/npm/registry/@denotest/cjs-local-global-decls/1.0.0/package.json
+++ b/cli/tests/testdata/npm/registry/@denotest/cjs-local-global-decls/1.0.0/package.json
@@ -1,4 +1,4 @@
{
"name": "@deno/cjs-local-global-decls",
"version": "1.0.0"
-} \ No newline at end of file
+}
diff --git a/cli/tests/testdata/npm/registry/@denotest/esm-bin/1.0.0/cli.mjs b/cli/tests/testdata/npm/registry/@denotest/esm-bin/1.0.0/cli.mjs
new file mode 100644
index 000000000..0ae8e9190
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/esm-bin/1.0.0/cli.mjs
@@ -0,0 +1,5 @@
+import process from "node:process";
+
+for (const arg of process.argv.slice(2)) {
+ console.log(arg);
+}
diff --git a/cli/tests/testdata/npm/registry/@denotest/esm-bin/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/esm-bin/1.0.0/package.json
new file mode 100644
index 000000000..ecd0d24a7
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/esm-bin/1.0.0/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "@deno/esm-bin",
+ "version": "1.0.0",
+ "bin": "./cli.mjs"
+}