Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
54ae78f9
Unverified
Commit
54ae78f9
authored
Oct 27, 2021
by
Tobias Koppers
Committed by
GitHub
Oct 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include stdio in error message (#30358)
Improve CI experience
parent
7a34e5ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
next-test-utils.js
test/lib/next-test-utils.js
+15
-1
No files found.
test/lib/next-test-utils.js
View file @
54ae78f9
...
@@ -144,26 +144,38 @@ export function runNextCommand(argv, options = {}) {
...
@@ -144,26 +144,38 @@ export function runNextCommand(argv, options = {}) {
options
.
instance
(
instance
)
options
.
instance
(
instance
)
}
}
let
mergedStdio
=
''
let
stderrOutput
=
''
let
stderrOutput
=
''
if
(
options
.
stderr
)
{
if
(
options
.
stderr
)
{
instance
.
stderr
.
on
(
'data'
,
function
(
chunk
)
{
instance
.
stderr
.
on
(
'data'
,
function
(
chunk
)
{
mergedStdio
+=
chunk
stderrOutput
+=
chunk
stderrOutput
+=
chunk
if
(
options
.
stderr
===
'log'
)
{
if
(
options
.
stderr
===
'log'
)
{
console
.
log
(
chunk
.
toString
())
console
.
log
(
chunk
.
toString
())
}
}
})
})
}
else
{
instance
.
stderr
.
on
(
'data'
,
function
(
chunk
)
{
mergedStdio
+=
chunk
})
}
}
let
stdoutOutput
=
''
let
stdoutOutput
=
''
if
(
options
.
stdout
)
{
if
(
options
.
stdout
)
{
instance
.
stdout
.
on
(
'data'
,
function
(
chunk
)
{
instance
.
stdout
.
on
(
'data'
,
function
(
chunk
)
{
mergedStdio
+=
chunk
stdoutOutput
+=
chunk
stdoutOutput
+=
chunk
if
(
options
.
stdout
===
'log'
)
{
if
(
options
.
stdout
===
'log'
)
{
console
.
log
(
chunk
.
toString
())
console
.
log
(
chunk
.
toString
())
}
}
})
})
}
else
{
instance
.
stdout
.
on
(
'data'
,
function
(
chunk
)
{
mergedStdio
+=
chunk
})
}
}
instance
.
on
(
'close'
,
(
code
,
signal
)
=>
{
instance
.
on
(
'close'
,
(
code
,
signal
)
=>
{
...
@@ -173,7 +185,9 @@ export function runNextCommand(argv, options = {}) {
...
@@ -173,7 +185,9 @@ export function runNextCommand(argv, options = {}) {
!
options
.
ignoreFail
&&
!
options
.
ignoreFail
&&
code
!==
0
code
!==
0
)
{
)
{
return
reject
(
new
Error
(
`command failed with code
${
code
}
`
))
return
reject
(
new
Error
(
`command failed with code
${
code
}
\n
${
mergedStdio
}
`
)
)
}
}
resolve
({
resolve
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment