@@ -41,13 +41,13 @@ class HoneycombReporter {
41
41
} )
42
42
43
43
runner . on ( 'test' , ( test ) => {
44
- const title = test . titlePath ( ) . join ( ' / ' )
45
- // This regex pulls apart a string like `e2e async timeouts / failing1 [electron]`
46
- // into `e2e async timeouts / failing1` and `electron`, letting us use the same
44
+ const path = test . titlePath ( )
45
+ // This regex pulls apart a string like `failing1 [electron]`
46
+ // into `failing1` and `electron`, letting us use the same
47
47
// test name for all browsers, with the browser as a separate field.
48
48
// The browser capture group is optional because some tests aren't browser specific,
49
49
// in which case it will be undefined and not passed as a field to honeycomb.
50
- const [ , testTitle , browser ] = title . match ( / ( .+ ?) (?: \[ ( [ a - z ] + ) \] ) ? $ / )
50
+ const [ , testTitle , browser ] = path [ path . length - 1 ] . match ( / ( .+ ?) (?: \[ ( [ a - z ] + ) \] ) ? $ / )
51
51
52
52
test . honeycombEvent = this . honey . newEvent ( )
53
53
test . honeycombEvent . timestamp = Date . now ( )
@@ -76,8 +76,7 @@ class HoneycombReporter {
76
76
durationMs : Date . now ( ) - test . honeycombEvent . timestamp ,
77
77
} )
78
78
79
- console . log ( test . honeycombEvent . data )
80
- // test.honeycombEvent.send()
79
+ test . honeycombEvent . send ( )
81
80
} )
82
81
83
82
runner . on ( 'suite end' , ( suite ) => {
0 commit comments