@@ -11,6 +11,7 @@ import {
1111 isPluginApiVersionSupported ,
1212 createPluginApiIncompatibleDiagnostic ,
1313 isReporterEventRequired ,
14+ parseReporterExtensionEventName ,
1415 type IReporter ,
1516 type IReporterEventEnvelope ,
1617 type IReporterEventScope ,
@@ -106,12 +107,12 @@ describe('createScopedReporter', () => {
106107 it ( 'validates and wraps extension events, rejecting non-namespaced names' , ( ) => {
107108 const sink : CapturingSink = new CapturingSink ( ) ;
108109 const reporter : IScopedReporter = createScopedReporter ( { sink, sessionId : 'sess' , source : SOURCE } ) ;
109- reporter . emitExtension ( 'acme.cache-warmed' , { hits : 3 } ) ;
110+ reporter . emitExtension ( parseReporterExtensionEventName ( 'acme.cache-warmed' ) , { hits : 3 } ) ;
110111 expect ( sink . inputs [ 0 ] . type ) . toBe ( 'extension' ) ;
111112 expect ( sink . inputs [ 0 ] . payload ) . toEqual ( { name : 'acme.cache-warmed' , payload : { hits : 3 } } ) ;
112- expect ( ( ) => reporter . emitExtension ( 'notnamespaced' as Parameters < IScopedReporter [ 'emitExtension' ] > [ 0 ] , { } ) ) . toThrow (
113- / I n v a l i d e x t e n s i o n e v e n t n a m e /
114- ) ;
113+ expect ( ( ) =>
114+ reporter . emitExtension ( 'notnamespaced' as Parameters < IScopedReporter [ 'emitExtension' ] > [ 0 ] , { } )
115+ ) . toThrow ( / I n v a l i d e x t e n s i o n e v e n t n a m e / ) ;
115116 } ) ;
116117
117118 it ( 'exposes only emit methods, hiding modes, destinations, and thresholds' , ( ) => {
0 commit comments