Skip to content

Commit 927cbf6

Browse files
committed
lint and remove remote function test
1 parent b70134b commit 927cbf6

File tree

2 files changed

+1
-38
lines changed

2 files changed

+1
-38
lines changed

dev-packages/e2e-tests/test-applications/sveltekit-2-kit-tracing/tests/tracing.test.ts

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -385,40 +385,3 @@ test('captures one navigation transaction per redirect', async ({ page }) => {
385385
},
386386
});
387387
});
388-
389-
test('captures remote function call spans', async ({ page }) => {
390-
const clientTxnEventPromise = waitForTransaction('sveltekit-2-kit-tracing', txnEvent => {
391-
return txnEvent?.transaction === '/remote-functions';
392-
});
393-
394-
const serverTxnEventPromise = waitForTransaction('sveltekit-2-kit-tracing', txnEvent => {
395-
return txnEvent?.transaction === 'GET /remote-functions';
396-
});
397-
398-
const remoteFunctionTracePromise = waitForTransaction('sveltekit-2-kit-tracing', txnEvent => {
399-
return txnEvent?.transaction === 'sveltekit.handle.root';
400-
});
401-
402-
await waitForInitialPageload(page, { route: '/remote-functions' });
403-
404-
const [clientTxnEvent, serverTxnEvent, remoteFunctionEvent] = await Promise.all([
405-
clientTxnEventPromise,
406-
serverTxnEventPromise,
407-
remoteFunctionTracePromise,
408-
]);
409-
410-
const clientRemoteCallSpans = clientTxnEvent.spans?.filter(s => s.op === 'http.client');
411-
412-
// only the `getLikes()` function is called from the client
413-
// `getPosts()` seems to have been only called on the server
414-
expect(clientRemoteCallSpans).toHaveLength(1);
415-
416-
const clientRemoteCallSpan = clientRemoteCallSpans && clientRemoteCallSpans[0];
417-
expect(clientRemoteCallSpan).toMatchObject({
418-
op: 'http.client',
419-
description: expect.stringMatching(/^GET \/_app\/remote\/.+\/getLikes$/),
420-
origin: 'auto.http.browser',
421-
});
422-
423-
console.log(JSON.stringify(remoteFunctionEvent, null, 2));
424-
});

packages/sveltekit/test/server-common/processKitSpans.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { EventType, SpanJSON, TransactionEvent } from '@sentry/core';
1+
import type { SpanJSON, TransactionEvent } from '@sentry/core';
22
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
33
import { describe, expect, it } from 'vitest';
44
import { _enhanceKitSpan, svelteKitSpansIntegration } from '../../src/server-common/processKitSpans';

0 commit comments

Comments
 (0)