File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
dev-packages/node-integration-tests/utils Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -294,13 +294,17 @@ export function createRunner(...paths: string[]) {
294294 // Catch any error or failed assertions and pass them to done to end the test quickly
295295 try {
296296 if ( ! expected ) {
297- return ;
297+ return ;
298298 }
299299
300300 const expectedType = Object . keys ( expected ) [ 0 ] ;
301301
302302 if ( expectedType !== envelopeItemType ) {
303- throw new Error ( `Expected envelope item type '${ expectedType } ' but got '${ envelopeItemType } '` ) ;
303+ throw new Error (
304+ `Expected envelope item type '${ expectedType } ' but got '${ envelopeItemType } '. \nItem: ${ JSON . stringify (
305+ item ,
306+ ) } `,
307+ ) ;
304308 }
305309
306310 if ( 'event' in expected ) {
@@ -322,7 +326,9 @@ export function createRunner(...paths: string[]) {
322326 expectClientReport ( item [ 1 ] as ClientReport , expected . client_report ) ;
323327 expectCallbackCalled ( ) ;
324328 } else {
325- throw new Error ( `Unhandled expected envelope item type: ${ JSON . stringify ( expected ) } ` ) ;
329+ throw new Error (
330+ `Unhandled expected envelope item type: ${ JSON . stringify ( expected ) } \nItem: ${ JSON . stringify ( item ) } ` ,
331+ ) ;
326332 }
327333 } catch ( e ) {
328334 complete ( e as Error ) ;
You can’t perform that action at this time.
0 commit comments