Skip to content

Commit abb5513

Browse files
committed
Use GEN_AI_DECIDE constant in TypeSafe test assertions
1 parent db16762 commit abb5513

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

  • dev-packages/node-integration-tests/suites/tracing/typesafe

‎dev-packages/node-integration-tests/suites/tracing/typesafe/test.ts‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
SENTRY_OP,
1212
SENTRY_ORIGIN,
1313
} from '@sentry/conventions/attributes';
14+
import { GEN_AI_DECIDE } from '@sentry/conventions/op';
1415
import { afterAll, describe, expect } from 'vitest';
1516
import { cleanupChildProcesses, createEsmAndCjsTests } from '../../../utils/runner';
1617

@@ -33,9 +34,7 @@ describe('TypeSafe integration', () => {
3334
.unordered()
3435
.expect({
3536
span: container => {
36-
const decideSpans = container.items.filter(
37-
span => span.attributes[SENTRY_OP]?.value === 'gen_ai.decide',
38-
);
37+
const decideSpans = container.items.filter(span => span.attributes[SENTRY_OP]?.value === GEN_AI_DECIDE);
3938
expect(decideSpans).toHaveLength(4);
4039
for (const span of decideSpans) {
4140
expect(span.attributes[SENTRY_ORIGIN]?.value).toBe('auto.ai.typesafe');
@@ -130,9 +129,7 @@ describe('TypeSafe integration', () => {
130129
.unordered()
131130
.expect({
132131
span: container => {
133-
const decideSpans = container.items.filter(
134-
span => span.attributes[SENTRY_OP]?.value === 'gen_ai.decide',
135-
);
132+
const decideSpans = container.items.filter(span => span.attributes[SENTRY_OP]?.value === GEN_AI_DECIDE);
136133
expect(decideSpans).toHaveLength(4);
137134
expect(decideSpans.filter(span => span.status === 'error')).toHaveLength(2);
138135
for (const span of decideSpans) {

0 commit comments

Comments
 (0)