-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: show error log message for workspace run failures
- Loading branch information
1 parent
7788ef2
commit f1274d3
Showing
2 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
const t = require('tap') | ||
const setup = require('./fixtures/setup.js') | ||
|
||
t.test('basic', async t => { | ||
const { npm } = await setup(t) | ||
|
||
await t.test('npm install sends correct user-agent', async t => { | ||
await npm('init', '-y') | ||
await npm('init', '-y', `--workspace=pkga`) | ||
await npm('init', '-y', `--workspace=pkgb`) | ||
|
||
await npm('pkg', 'set', '-w=pkga', `scripts.hello=echo a`) | ||
await npm('pkg', 'set', '-w=pkgb', `scripts.hello=exit 1`) | ||
|
||
const logs = await npm('run', 'hello', '-ws').catch((r) => r.stderr) | ||
|
||
t.match(logs, 'A complete log of this run can be found in:', 'has log message') | ||
}) | ||
}) |