Skip to content

Commit c0f3b10

Browse files
committed
fixup! include error message (not just stack) in final report
1 parent f6d50f6 commit c0f3b10

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

run.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ export async function run( {
8585
const reportId = message.id;
8686
const report = reports[ reportId ];
8787
touchBrowser( report.browser );
88-
const errors = reportTest( message.data, report );
88+
const errorMessage = reportTest( message.data, report );
8989
pendingErrors[ reportId ] ??= Object.create( null );
90-
if ( errors ) {
91-
pendingErrors[ reportId ][ message.data.name ] = errors;
90+
if ( errorMessage ) {
91+
pendingErrors[ reportId ][ message.data.name ] = errorMessage;
9292
} else {
9393
const existing = pendingErrors[ reportId ][ message.data.name ];
9494

@@ -112,7 +112,8 @@ export async function run( {
112112
touchBrowser( report.browser );
113113
reportError( message.data );
114114
pendingErrors[ reportId ] ??= Object.create( null );
115-
pendingErrors[ reportId ][ message.data.message ] = message.data.stack;
115+
pendingErrors[ reportId ][ message.data.message ] =
116+
`${ message.data.message }\n${ message.data.stack }`;
116117
break;
117118
}
118119
case "runEnd": {
@@ -347,9 +348,9 @@ export async function run( {
347348
stop = true;
348349
console.error(
349350
chalk.red(
350-
`No tests were run with URL "${ report.url }" in ${ getBrowserString(
351-
report.browser
352-
) } (${ report.id })`
351+
`No tests were run with URL "${ report.url }" in ${
352+
report.fullBrowser
353+
} (${ report.id })`
353354
)
354355
);
355356
}

0 commit comments

Comments
 (0)