summaryrefslogtreecommitdiff
path: root/tests/specs/npm/bin_entry_created_by_lifecycle
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs/npm/bin_entry_created_by_lifecycle')
-rw-r--r--tests/specs/npm/bin_entry_created_by_lifecycle/__test__.jsonc29
-rw-r--r--tests/specs/npm/bin_entry_created_by_lifecycle/all_at_once_install.out4
-rw-r--r--tests/specs/npm/bin_entry_created_by_lifecycle/install_warn.out10
-rw-r--r--tests/specs/npm/bin_entry_created_by_lifecycle/install_warn_windows.out9
-rw-r--r--tests/specs/npm/bin_entry_created_by_lifecycle/package.json8
-rw-r--r--tests/specs/npm/bin_entry_created_by_lifecycle/run_testbin.out2
6 files changed, 62 insertions, 0 deletions
diff --git a/tests/specs/npm/bin_entry_created_by_lifecycle/__test__.jsonc b/tests/specs/npm/bin_entry_created_by_lifecycle/__test__.jsonc
new file mode 100644
index 000000000..665aec823
--- /dev/null
+++ b/tests/specs/npm/bin_entry_created_by_lifecycle/__test__.jsonc
@@ -0,0 +1,29 @@
+{
+ "tempDir": true,
+ "tests": {
+ "all_at_once": {
+ "steps": [
+ {
+ "args": "install --allow-scripts",
+ "output": "all_at_once_install.out"
+ },
+ { "args": "task run-testbin", "output": "run_testbin.out" }
+ ]
+ },
+ "separate_steps": {
+ "steps": [
+ { "if": "unix", "args": "install", "output": "install_warn.out" },
+ {
+ "if": "windows",
+ "args": "install",
+ "output": "install_warn_windows.out"
+ },
+ {
+ "args": "install --allow-scripts",
+ "output": "Initialize @denotest/bin-created-by-lifecycle@1.0.0: running 'install' script\n"
+ },
+ { "args": "task run-testbin", "output": "run_testbin.out" }
+ ]
+ }
+ }
+}
diff --git a/tests/specs/npm/bin_entry_created_by_lifecycle/all_at_once_install.out b/tests/specs/npm/bin_entry_created_by_lifecycle/all_at_once_install.out
new file mode 100644
index 000000000..bfaba3caf
--- /dev/null
+++ b/tests/specs/npm/bin_entry_created_by_lifecycle/all_at_once_install.out
@@ -0,0 +1,4 @@
+Download http://localhost:4260/@denotest%2fbin-created-by-lifecycle
+Download http://localhost:4260/@denotest/bin-created-by-lifecycle/1.0.0.tgz
+Initialize @denotest/bin-created-by-lifecycle@1.0.0
+Initialize @denotest/bin-created-by-lifecycle@1.0.0: running 'install' script
diff --git a/tests/specs/npm/bin_entry_created_by_lifecycle/install_warn.out b/tests/specs/npm/bin_entry_created_by_lifecycle/install_warn.out
new file mode 100644
index 000000000..864a3f6f5
--- /dev/null
+++ b/tests/specs/npm/bin_entry_created_by_lifecycle/install_warn.out
@@ -0,0 +1,10 @@
+Download http://localhost:4260/@denotest%2fbin-created-by-lifecycle
+Download http://localhost:4260/@denotest/bin-created-by-lifecycle/1.0.0.tgz
+Initialize @denotest/bin-created-by-lifecycle@1.0.0
+Warning Trying to set up 'testbin' bin for "[WILDCARD]bin-created-by-lifecycle", but the entry point "[WILDCARD]testbin.js" doesn't exist.
+Warning The following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed:
+┠─ npm:@denotest/bin-created-by-lifecycle@1.0.0
+┃
+┠─ This may cause the packages to not work correctly.
+┖─ To run lifecycle scripts, use the `--allow-scripts` flag with `deno install`:
+ deno install --allow-scripts=npm:@denotest/bin-created-by-lifecycle@1.0.0
diff --git a/tests/specs/npm/bin_entry_created_by_lifecycle/install_warn_windows.out b/tests/specs/npm/bin_entry_created_by_lifecycle/install_warn_windows.out
new file mode 100644
index 000000000..683808873
--- /dev/null
+++ b/tests/specs/npm/bin_entry_created_by_lifecycle/install_warn_windows.out
@@ -0,0 +1,9 @@
+Download http://localhost:4260/@denotest%2fbin-created-by-lifecycle
+Download http://localhost:4260/@denotest/bin-created-by-lifecycle/1.0.0.tgz
+Initialize @denotest/bin-created-by-lifecycle@1.0.0
+Warning The following packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed:
+┠─ npm:@denotest/bin-created-by-lifecycle@1.0.0
+┃
+┠─ This may cause the packages to not work correctly.
+┖─ To run lifecycle scripts, use the `--allow-scripts` flag with `deno install`:
+ deno install --allow-scripts=npm:@denotest/bin-created-by-lifecycle@1.0.0
diff --git a/tests/specs/npm/bin_entry_created_by_lifecycle/package.json b/tests/specs/npm/bin_entry_created_by_lifecycle/package.json
new file mode 100644
index 000000000..9a8941ed9
--- /dev/null
+++ b/tests/specs/npm/bin_entry_created_by_lifecycle/package.json
@@ -0,0 +1,8 @@
+{
+ "dependencies": {
+ "@denotest/bin-created-by-lifecycle": "1.0.0"
+ },
+ "scripts": {
+ "run-testbin": "testbin"
+ }
+}
diff --git a/tests/specs/npm/bin_entry_created_by_lifecycle/run_testbin.out b/tests/specs/npm/bin_entry_created_by_lifecycle/run_testbin.out
new file mode 100644
index 000000000..a03f8bc58
--- /dev/null
+++ b/tests/specs/npm/bin_entry_created_by_lifecycle/run_testbin.out
@@ -0,0 +1,2 @@
+Task run-testbin testbin
+run testbin