@@ -45,26 +45,26 @@ class TestInstrumentation extends InstrumentationBase<TestInstrumentationConfig>
4545 }
4646}
4747
48- describe ( 'BaseInstrumentation' , ( ) => {
48+ describe ( 'BaseInstrumentation' , function ( ) {
4949 let instrumentation : Instrumentation ;
5050 beforeEach ( ( ) => {
5151 instrumentation = new TestInstrumentation ( ) ;
5252 } ) ;
5353
54- it ( 'should create an instance' , ( ) => {
54+ it ( 'should create an instance' , function ( ) {
5555 assert . ok ( instrumentation instanceof InstrumentationBase ) ;
5656 } ) ;
5757
58- it ( 'should have a name' , ( ) => {
58+ it ( 'should have a name' , function ( ) {
5959 assert . deepStrictEqual ( instrumentation . instrumentationName , 'test' ) ;
6060 } ) ;
6161
62- it ( 'should have a version' , ( ) => {
62+ it ( 'should have a version' , function ( ) {
6363 assert . deepStrictEqual ( instrumentation . instrumentationVersion , '1.0.0' ) ;
6464 } ) ;
6565
66- describe ( 'constructor' , ( ) => {
67- it ( 'should enable instrumentation by default' , ( ) => {
66+ describe ( 'constructor' , function ( ) {
67+ it ( 'should enable instrumentation by default' , function ( ) {
6868 let enableCalled = false ;
6969 let updateMetricInstrumentsCalled = false ;
7070 class TestInstrumentation2 extends TestInstrumentation {
@@ -81,12 +81,12 @@ describe('BaseInstrumentation', () => {
8181 } ) ;
8282 } ) ;
8383
84- describe ( 'setMeterProvider' , ( ) => {
84+ describe ( 'setMeterProvider' , function ( ) {
8585 let otelTestingMeterProvider : MeterProvider ;
8686 beforeEach ( ( ) => {
8787 otelTestingMeterProvider = new MeterProvider ( ) ;
8888 } ) ;
89- it ( 'should call _updateMetricInstruments' , ( ) => {
89+ it ( 'should call _updateMetricInstruments' , function ( ) {
9090 let called = true ;
9191 class TestInstrumentation2 extends TestInstrumentation {
9292 override _updateMetricInstruments ( ) {
@@ -99,8 +99,8 @@ describe('BaseInstrumentation', () => {
9999 } ) ;
100100 } ) ;
101101
102- describe ( 'setLoggerProvider' , ( ) => {
103- it ( 'should get a logger from provider' , ( ) => {
102+ describe ( 'setLoggerProvider' , function ( ) {
103+ it ( 'should get a logger from provider' , function ( ) {
104104 let called = true ;
105105 class TestLoggerProvider extends LoggerProvider {
106106 override getLogger ( name : any , version ?: any , options ?: any ) {
@@ -116,8 +116,8 @@ describe('BaseInstrumentation', () => {
116116 } ) ;
117117 } ) ;
118118
119- describe ( 'getConfig' , ( ) => {
120- it ( 'should return instrumentation config, "enabled" should be true by default' , ( ) => {
119+ describe ( 'getConfig' , function ( ) {
120+ it ( 'should return instrumentation config, "enabled" should be true by default' , function ( ) {
121121 const instrumentation : Instrumentation = new TestInstrumentation ( {
122122 isActive : false ,
123123 } ) ;
@@ -129,8 +129,8 @@ describe('BaseInstrumentation', () => {
129129 } ) ;
130130 } ) ;
131131
132- describe ( 'setConfig' , ( ) => {
133- it ( 'should set a new config for instrumentation' , ( ) => {
132+ describe ( 'setConfig' , function ( ) {
133+ it ( 'should set a new config for instrumentation' , function ( ) {
134134 const instrumentation : Instrumentation = new TestInstrumentation ( ) ;
135135 const config : TestInstrumentationConfig = {
136136 isActive : true ,
@@ -141,7 +141,7 @@ describe('BaseInstrumentation', () => {
141141 assert . strictEqual ( configuration . isActive , true ) ;
142142 } ) ;
143143
144- it ( 'should ensure "enabled" defaults to true' , ( ) => {
144+ it ( 'should ensure "enabled" defaults to true' , function ( ) {
145145 const instrumentation : Instrumentation = new TestInstrumentation ( ) ;
146146 const config : TestInstrumentationConfig = {
147147 isActive : true ,
@@ -154,7 +154,7 @@ describe('BaseInstrumentation', () => {
154154 } ) ;
155155 } ) ;
156156
157- describe ( 'getModuleDefinitions' , ( ) => {
157+ describe ( 'getModuleDefinitions' , function ( ) {
158158 const moduleDefinition : InstrumentationModuleDefinition = {
159159 name : 'foo' ,
160160 patch : moduleExports => { } ,
@@ -164,7 +164,7 @@ describe('BaseInstrumentation', () => {
164164 supportedVersions : [ '*' ] ,
165165 } ;
166166
167- it ( 'should return single module definition from init() as array ' , ( ) => {
167+ it ( 'should return single module definition from init() as array ' , function ( ) {
168168 class TestInstrumentation2 extends TestInstrumentation {
169169 override init ( ) {
170170 return moduleDefinition ;
@@ -177,7 +177,7 @@ describe('BaseInstrumentation', () => {
177177 ] ) ;
178178 } ) ;
179179
180- it ( 'should return multiple module definitions from init() as array ' , ( ) => {
180+ it ( 'should return multiple module definitions from init() as array ' , function ( ) {
181181 class TestInstrumentation2 extends TestInstrumentation {
182182 override init ( ) {
183183 return [ moduleDefinition , moduleDefinition , moduleDefinition ] ;
@@ -192,7 +192,7 @@ describe('BaseInstrumentation', () => {
192192 ] ) ;
193193 } ) ;
194194
195- it ( 'should return void from init() as empty array ' , ( ) => {
195+ it ( 'should return void from init() as empty array ' , function ( ) {
196196 class TestInstrumentation2 extends TestInstrumentation {
197197 override init ( ) {
198198 return ;
@@ -203,8 +203,8 @@ describe('BaseInstrumentation', () => {
203203 assert . deepStrictEqual ( instrumentation . getModuleDefinitions ( ) , [ ] ) ;
204204 } ) ;
205205
206- describe ( 'runInstrumentationEventHook' , ( ) => {
207- it ( 'should call the hook' , ( ) => {
206+ describe ( 'runInstrumentationEventHook' , function ( ) {
207+ it ( 'should call the hook' , function ( ) {
208208 const instrumentation = new TestInstrumentation ( { } ) ;
209209 let called = false ;
210210 const hook = ( ) => {
@@ -214,12 +214,12 @@ describe('BaseInstrumentation', () => {
214214 assert . strictEqual ( called , true ) ;
215215 } ) ;
216216
217- it ( 'empty hook should work' , ( ) => {
217+ it ( 'empty hook should work' , function ( ) {
218218 const instrumentation = new TestInstrumentation ( { } ) ;
219219 instrumentation . testRunHook ( undefined ) ;
220220 } ) ;
221221
222- it ( 'exception in hook should not crash' , ( ) => {
222+ it ( 'exception in hook should not crash' , function ( ) {
223223 const instrumentation = new TestInstrumentation ( { } ) ;
224224 const hook = ( ) => {
225225 throw new Error ( 'test' ) ;
0 commit comments