-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move run-script banners to stderr when in json mode
Fixes #7354
- Loading branch information
1 parent
d9cf7fc
commit e6317ad
Showing
3 changed files
with
28 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
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,12 @@ | ||
|
||
const t = require('tap') | ||
const setup = require('./fixtures/setup.js') | ||
|
||
t.test('pack --json returns only json on stdout', async t => { | ||
const { npmLocal } = await setup(t) | ||
|
||
const { stderr, stdout } = await npmLocal('pack', '--json') | ||
|
||
t.match(stderr, /> npm@.* prepack\n/, 'stderr has banner') | ||
t.ok(JSON.parse(stdout), 'stdout can be parsed as json') | ||
}) |