Skip to content

Commit 6dae216

Browse files
committed
Fix Hapi ESM test.
1 parent 11e7331 commit 6dae216

File tree

1 file changed

+12
-3
lines changed
  • plugins/node/opentelemetry-instrumentation-hapi/test

1 file changed

+12
-3
lines changed

plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,15 +557,24 @@ describe('Hapi Instrumentation - Core Tests', () => {
557557
},
558558
checkCollector: (collector: TestCollector) => {
559559
const spans = collector.sortedSpans;
560-
assert.strictEqual(spans.length, 2);
561-
assert.strictEqual(spans[0].name, 'GET /route/{param}');
560+
561+
assert.strictEqual(spans.length, 3);
562+
563+
assert.strictEqual(spans[0].name, 'GET');
562564
assert.strictEqual(
563565
spans[0].instrumentationScope.name,
564566
'@opentelemetry/instrumentation-http'
565567
);
566-
assert.strictEqual(spans[1].name, 'route - /route/{param}');
568+
569+
assert.strictEqual(spans[1].name, 'GET /route/{param}');
567570
assert.strictEqual(
568571
spans[1].instrumentationScope.name,
572+
'@opentelemetry/instrumentation-http'
573+
);
574+
575+
assert.strictEqual(spans[2].name, 'route - /route/{param}');
576+
assert.strictEqual(
577+
spans[2].instrumentationScope.name,
569578
'@opentelemetry/instrumentation-hapi'
570579
);
571580
},

0 commit comments

Comments
 (0)