Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-03-22 21:51:38 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2021-03-22 22:08:22 +0300
commit93a061d737dc769663652368e8586e4202267b9e (patch)
treebeb127b31b53fa42abbf739dcbfc958621289c49 /test
parente1b3b318f095a7e1a7cc4b131907de4955275d9d (diff)
fix(usage): add action items to error output
PR-URL: https://github.com/npm/cli/pull/2917 Credit: @wraithgar Close: #2917 Reviewed-by: @ruyadorno
Diffstat (limited to 'test')
-rw-r--r--test/lib/run-script.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/lib/run-script.js b/test/lib/run-script.js
index 265565705..f7eb46fed 100644
--- a/test/lib/run-script.js
+++ b/test/lib/run-script.js
@@ -896,27 +896,27 @@ t.test('workspaces', t => {
t.match(RUN_SCRIPTS, [])
t.strictSame(LOG.map(cleanOutput), [
'Lifecycle script `missing-script` failed with error:',
- 'Error: Missing script: "missing-script"',
+ 'Error: Missing script: "missing-script"\n\nTo see a list of scripts, run:\n npm run',
' in workspace: a@1.0.0',
' at location: {CWD}/test/lib/run-script-workspaces/packages/a',
'Lifecycle script `missing-script` failed with error:',
- 'Error: Missing script: "missing-script"',
+ 'Error: Missing script: "missing-script"\n\nTo see a list of scripts, run:\n npm run',
' in workspace: b@2.0.0',
' at location: {CWD}/test/lib/run-script-workspaces/packages/b',
'Lifecycle script `missing-script` failed with error:',
- 'Error: Missing script: "missing-script"',
+ 'Error: Missing script: "missing-script"\n\nTo see a list of scripts, run:\n npm run',
' in workspace: c@1.0.0',
' at location: {CWD}/test/lib/run-script-workspaces/packages/c',
'Lifecycle script `missing-script` failed with error:',
- 'Error: Missing script: "missing-script"',
+ 'Error: Missing script: "missing-script"\n\nTo see a list of scripts, run:\n npm run',
' in workspace: d@1.0.0',
' at location: {CWD}/test/lib/run-script-workspaces/packages/d',
'Lifecycle script `missing-script` failed with error:',
- 'Error: Missing script: "missing-script"',
+ 'Error: Missing script: "missing-script"\n\nTo see a list of scripts, run:\n npm run',
' in workspace: e',
' at location: {CWD}/test/lib/run-script-workspaces/packages/e',
'Lifecycle script `missing-script` failed with error:',
- 'Error: Missing script: "missing-script"',
+ 'Error: Missing script: "missing-script"\n\nTo see a list of scripts, run:\n npm run',
' in workspace: noscripts@1.0.0',
' at location: {CWD}/test/lib/run-script-workspaces/packages/noscripts',
], 'should log error msgs for each workspace script')
@@ -937,11 +937,11 @@ t.test('workspaces', t => {
t.match(RUN_SCRIPTS, [])
t.strictSame(LOG.map(cleanOutput), [
'Lifecycle script `test` failed with error:',
- 'Error: Missing script: "test"',
+ 'Error: Missing script: "test"\n\nTo see a list of scripts, run:\n npm run',
' in workspace: a@1.0.0',
' at location: {CWD}/test/lib/run-script-workspaces/packages/a',
'Lifecycle script `test` failed with error:',
- 'Error: Missing script: "test"',
+ 'Error: Missing script: "test"\n\nTo see a list of scripts, run:\n npm run',
' in workspace: b@2.0.0',
' at location: {CWD}/test/lib/run-script-workspaces/packages/b',
], 'should log error msgs for each workspace script')