Compare commits

..

1 Commits

Author SHA1 Message Date
Milo Hansen ddb4300df7
Merge 3fb6df0f0f into bebdfa2a88 2025-04-09 20:25:42 +10:00
1 changed files with 0 additions and 16 deletions

View File

@ -26,13 +26,6 @@ describe('OpenTelemetry middleware', () => {
throw new Error('error message')
})
const subapp = new Hono()
subapp.get('/hello', (c) => c.text('Hello from subapp!'))
subapp.get('*', (c) => c.text('Fallthrough'))
// mount subapp
app.route('/subapp', subapp)
it('Should make a span', async () => {
memoryExporter.reset()
const response = await app.request('http://localhost/foo')
@ -78,13 +71,4 @@ describe('OpenTelemetry middleware', () => {
expect(span.name).toBe('GET /foo')
expect(span.attributes[ATTR_HTTP_ROUTE]).toBe('/foo')
})
// Issue #1112
it('Should set the correct span name for subapp', async () => {
memoryExporter.reset()
await app.request('http://localhost/subapp/hello')
const spans = memoryExporter.getFinishedSpans()
const [span] = spans
expect(span.name).toBe('GET /subapp/hello')
})
})