From 6dae216450581eb4d241d0bda6a0f5c0fd5c7921 Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Thu, 5 Dec 2024 19:40:36 +0000 Subject: [PATCH] Fix Hapi ESM test. --- .../test/hapi.test.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts b/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts index af87e04901..48e2c51912 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts +++ b/plugins/node/opentelemetry-instrumentation-hapi/test/hapi.test.ts @@ -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' ); },