Skip to content

Commit f10c64b

Browse files
committed
use example.com as external API
1 parent a3c0aaf commit f10c64b

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { defineEventHandler } from '#imports';
22

33
export default defineEventHandler(async () => {
4-
const data = await $fetch('https://ungh.cc/orgs/unjs/repos');
5-
6-
return data;
4+
return await $fetch('https://example.com');
75
});

dev-packages/e2e-tests/test-applications/nuxt-4/tests/tracing.server.test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,7 @@ test('captures server API calls made with Nitro $fetch', async ({ page }) => {
5353
await page.getByText('Fetch Nitro $fetch', { exact: true }).click();
5454

5555
const httpServerFetchSpan = await transactionPromise;
56-
const httpClientSpan = httpServerFetchSpan.spans.find(
57-
span => span.description === 'GET https://ungh.cc/orgs/unjs/repos',
58-
);
59-
60-
const error = await transactionPromise;
56+
const httpClientSpan = httpServerFetchSpan.spans.find(span => span.description === 'GET https://example.com/');
6157

6258
expect(httpServerFetchSpan.transaction).toEqual('GET /api/nitro-fetch');
6359
expect(httpServerFetchSpan.contexts.trace.op).toEqual('http.server');

0 commit comments

Comments
 (0)