-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathtest.ts
More file actions
28 lines (25 loc) · 875 Bytes
/
test.ts
File metadata and controls
28 lines (25 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { afterAll, describe, expect, test } from 'vitest';
import { cleanupChildProcesses, createRunner } from '../../../../utils/runner';
const EXPECTED_TRANSCATION = {
transaction: 'Test Transaction (query GetHello)',
spans: expect.arrayContaining([
expect.objectContaining({
description: 'query GetHello',
origin: 'auto.graphql.otel.graphql',
status: 'ok',
}),
]),
};
describe('graphqlIntegration', () => {
afterAll(() => {
cleanupChildProcesses();
});
test('should use GraphQL operation name for root span if useOperationNameForRootSpan is set', async () => {
await createRunner(__dirname, 'scenario.js')
.ignore('event')
.expect({ transaction: { transaction: 'Test Server Start (query IntrospectionQuery)' } })
.expect({ transaction: EXPECTED_TRANSCATION })
.start()
.completed();
});
});