Skip to content

Commit 4421022

Browse files
committed
Update tests for refactored implementation.
1 parent 2adde9b commit 4421022

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/tracing/test/integrations/apollo.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,18 @@ describe('setupOnce', () => {
8686
expect(scope.getSpan).toBeCalled();
8787
expect(parentSpan.startChild).toBeCalledWith({
8888
description: 'Query.res_1',
89-
op: 'apollo',
89+
op: 'db.graphql.apollo',
9090
});
9191
expect(childSpan.finish).toBeCalled();
92-
expect(scope.setSpan).toHaveBeenCalledTimes(2);
9392
});
9493

9594
it('should wrap another simple resolver', () => {
9695
ApolloServer.config.resolvers[0]?.['Mutation']?.['res_2']?.();
9796
expect(scope.getSpan).toBeCalled();
9897
expect(parentSpan.startChild).toBeCalledWith({
9998
description: 'Mutation.res_2',
100-
op: 'apollo',
99+
op: 'db.graphql.apollo',
101100
});
102101
expect(childSpan.finish).toBeCalled();
103-
expect(scope.setSpan).toHaveBeenCalledTimes(2);
104102
});
105103
});

packages/tracing/test/integrations/graphql.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('setupOnce', () => {
4848
expect(scope.getSpan).toBeCalled();
4949
expect(parentSpan.startChild).toBeCalledWith({
5050
description: 'execute',
51-
op: 'graphql',
51+
op: 'db.graphql',
5252
});
5353
expect(childSpan.finish).toBeCalled();
5454
expect(scope.setSpan).toHaveBeenCalledTimes(2);

0 commit comments

Comments
 (0)