File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,25 @@ export function SaucelabsReporter(logger, browserMap: BrowserMap) {
2828 // This fires when a single test is executed and will update the run in sauce labs with an annotation
2929 // of the test including the status of the test
3030 this . onSpecComplete = function ( browser , result ) {
31+ const browserId = browser . id ;
32+ const browserData = browserMap . get ( browserId ) ;
33+
34+ // Do nothing if the current browser has not been launched through the Saucelabs
35+ // launcher.
36+ if ( ! browserData ) {
37+ return ;
38+ }
39+
3140 const status = result . success ? '✅' : '❌'
3241
33- browserMap . get ( browser . id ) . results . push ( {
42+ browserData . results . push ( {
3443 status : 'info' ,
3544 message : `${ status } ${ result . fullName } ` ,
3645 screenshot : null
3746 } )
3847
3948 if ( ! result . success && result . log . length > 0 ) {
40- browserMap . get ( browser . id ) . results . push ( {
49+ browserData . results . push ( {
4150 status : 'info' ,
4251 message : `${ result . log [ 0 ] } ` ,
4352 screenshot : null
You can’t perform that action at this time.
0 commit comments