Skip to content

Commit

Permalink
Fix Hapi ESM test.
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed Dec 5, 2024
1 parent 11e7331 commit 6dae216
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -557,15 +557,24 @@ describe('Hapi Instrumentation - Core Tests', () => {
},
checkCollector: (collector: TestCollector) => {
const spans = collector.sortedSpans;
assert.strictEqual(spans.length, 2);
assert.strictEqual(spans[0].name, 'GET /route/{param}');

assert.strictEqual(spans.length, 3);

assert.strictEqual(spans[0].name, 'GET');
assert.strictEqual(
spans[0].instrumentationScope.name,
'@opentelemetry/instrumentation-http'
);
assert.strictEqual(spans[1].name, 'route - /route/{param}');

assert.strictEqual(spans[1].name, 'GET /route/{param}');
assert.strictEqual(
spans[1].instrumentationScope.name,
'@opentelemetry/instrumentation-http'
);

assert.strictEqual(spans[2].name, 'route - /route/{param}');
assert.strictEqual(
spans[2].instrumentationScope.name,
'@opentelemetry/instrumentation-hapi'
);
},
Expand Down

0 comments on commit 6dae216

Please sign in to comment.