diff options
Diffstat (limited to 'tests/specs/npm/lifecycle_scripts')
-rw-r--r-- | tests/specs/npm/lifecycle_scripts/__test__.jsonc | 17 | ||||
-rw-r--r-- | tests/specs/npm/lifecycle_scripts/only_warns_first1.out | 14 | ||||
-rw-r--r-- | tests/specs/npm/lifecycle_scripts/only_warns_first2.out | 3 |
3 files changed, 34 insertions, 0 deletions
diff --git a/tests/specs/npm/lifecycle_scripts/__test__.jsonc b/tests/specs/npm/lifecycle_scripts/__test__.jsonc index fa60e7963..18a2d405e 100644 --- a/tests/specs/npm/lifecycle_scripts/__test__.jsonc +++ b/tests/specs/npm/lifecycle_scripts/__test__.jsonc @@ -55,6 +55,23 @@ } ] }, + "only_warns_first": { + "tempDir": true, + "steps": [ + { + // without running scripts (should warn) + "args": "run all_lifecycles.js", + "output": "only_warns_first1.out", + "exitCode": 1 + }, + { + // without running scripts (does not warn) + "args": "run all_lifecycles.js", + "output": "only_warns_first2.out", + "exitCode": 1 + } + ] + }, "future_install_lifecycle_scripts": { "tempDir": true, "envs": { diff --git a/tests/specs/npm/lifecycle_scripts/only_warns_first1.out b/tests/specs/npm/lifecycle_scripts/only_warns_first1.out new file mode 100644 index 000000000..6ebf96028 --- /dev/null +++ b/tests/specs/npm/lifecycle_scripts/only_warns_first1.out @@ -0,0 +1,14 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/node-lifecycle-scripts +Download http://localhost:4260/@denotest/bin +Download http://localhost:4260/@denotest/node-lifecycle-scripts/1.0.0.tgz +Download http://localhost:4260/@denotest/bin/1.0.0.tgz +Initialize @denotest/node-lifecycle-scripts@1.0.0 +Initialize @denotest/bin@1.0.0 +[UNORDERED_END] +warning: Packages contained npm lifecycle scripts (preinstall/install/postinstall) that were not executed. + This may cause the packages to not work correctly. To run them, use the `--allow-scripts` flag with `deno cache` + (e.g. `deno cache --allow-scripts=pkg1,pkg2 <entrypoint>`): + npm:@denotest/node-lifecycle-scripts@1.0.0 +error: Uncaught SyntaxError: The requested module 'npm:@denotest/node-lifecycle-scripts' does not provide an export named 'value' +[WILDCARD] diff --git a/tests/specs/npm/lifecycle_scripts/only_warns_first2.out b/tests/specs/npm/lifecycle_scripts/only_warns_first2.out new file mode 100644 index 000000000..f6a02c727 --- /dev/null +++ b/tests/specs/npm/lifecycle_scripts/only_warns_first2.out @@ -0,0 +1,3 @@ +[# note no warning] +error: Uncaught SyntaxError: The requested module 'npm:@denotest/node-lifecycle-scripts' does not provide an export named 'value' +[WILDCARD] |