@@ -34,9 +34,17 @@ function multiply(a: number, b: number): number {
3434 return a * b ;
3535}
3636
37- function namedFn ( ) : void { }
37+ // Empty body — fixture only exists so the wrapper can read its `name` and
38+ // fall back to it (`'namedFn'`) for telemetry attribution.
39+ function namedFn ( ) : void {
40+ /* fixture: intentionally empty */
41+ }
3842
39- const anonFn = function ( ) { } ;
43+ // Empty body — fixture only exists so the wrapper can detect the missing
44+ // `name` and fall back to `'unknown_function'`.
45+ const anonFn = function ( ) {
46+ /* fixture: intentionally empty */
47+ } ;
4048Object . defineProperty ( anonFn , 'name' , { value : '' } ) ;
4149
4250describe ( 'createTrack — method decorator' , ( ) => {
@@ -84,7 +92,9 @@ describe('createTrack — method decorator', () => {
8492
8593 class Service {
8694 @track ( 'Tasks.Create' , { attributes : { Source : 'unit-test' } } )
87- public create ( ) : void { }
95+ public create ( ) : void {
96+ /* fixture: only the decorator side effect matters */
97+ }
8898 }
8999
90100 new Service ( ) . create ( ) ;
@@ -121,7 +131,9 @@ describe('createTrack — method decorator', () => {
121131 // public `TrackOptions.condition` signature; the callback
122132 // sees the runtime args as expected.
123133 @track ( 'Tasks.Create' , { condition : condition as unknown as ( ...args : unknown [ ] ) => boolean } )
124- public create ( _value : number ) : void { }
134+ public create ( _value : number ) : void {
135+ /* fixture: only the decorator side effect matters */
136+ }
125137 }
126138
127139 const svc = new Service ( ) ;
@@ -139,7 +151,9 @@ describe('createTrack — method decorator', () => {
139151
140152 class Service {
141153 @track ( 'Tasks.Create' )
142- public create ( ) : void { }
154+ public create ( ) : void {
155+ /* fixture: only the decorator side effect matters */
156+ }
143157 }
144158
145159 const svc = new Service ( ) ;
@@ -176,7 +190,9 @@ describe('createTrack — method decorator', () => {
176190
177191 class Service {
178192 @track ( 'Tasks.Create' )
179- public create ( ) : void { }
193+ public create ( ) : void {
194+ /* fixture: only the decorator side effect matters */
195+ }
180196 }
181197
182198 new Service ( ) . create ( ) ;
0 commit comments