Skip to content

Commit 90fd6db

Browse files
committed
remove unneeded tests
1 parent 06998ac commit 90fd6db

3 files changed

Lines changed: 0 additions & 59 deletions

File tree

‎packages/core/test/lib/utils/anthropic-utils.test.ts‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { describe, expect, it } from 'vitest';
2-
import { ANTHROPIC_METHOD_REGISTRY } from '../../../src/tracing/anthropic-ai/constants';
32
import { mapAnthropicErrorToStatusMessage, messagesFromParams, setMessagesAttribute } from '../../../src/tracing/anthropic-ai/utils';
43
import type { Span } from '../../../src/types-hoist/span';
54

@@ -25,18 +24,6 @@ describe('anthropic-ai-utils', () => {
2524
});
2625
});
2726

28-
describe('ANTHROPIC_METHOD_REGISTRY', () => {
29-
it('should contain known methods', () => {
30-
expect(ANTHROPIC_METHOD_REGISTRY['models.get']).toBeDefined();
31-
expect(ANTHROPIC_METHOD_REGISTRY['messages.create']?.operation).toBe('chat');
32-
expect(ANTHROPIC_METHOD_REGISTRY['messages.stream']?.streaming).toBe(true);
33-
});
34-
35-
it('should not contain unknown methods', () => {
36-
expect(ANTHROPIC_METHOD_REGISTRY['models.unknown.thing']).toBeUndefined();
37-
});
38-
});
39-
4027
describe('messagesFromParams', () => {
4128
it('includes system message in messages list', () => {
4229
expect(

‎packages/core/test/lib/utils/google-genai-utils.test.ts‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
11
import { describe, expect, it } from 'vitest';
2-
import { GOOGLE_GENAI_METHOD_REGISTRY } from '../../../src/tracing/google-genai/constants';
32
import type { ContentListUnion } from '../../../src/tracing/google-genai/utils';
43
import { contentUnionToMessages } from '../../../src/tracing/google-genai/utils';
54

6-
describe('GOOGLE_GENAI_METHOD_REGISTRY', () => {
7-
it('detects which methods to instrument', () => {
8-
expect(GOOGLE_GENAI_METHOD_REGISTRY['models.generateContent']).toBeDefined();
9-
expect(GOOGLE_GENAI_METHOD_REGISTRY['chat.sendMessage']).toBeDefined();
10-
expect(GOOGLE_GENAI_METHOD_REGISTRY['unknown']).toBeUndefined();
11-
});
12-
13-
it('marks streaming methods', () => {
14-
expect(GOOGLE_GENAI_METHOD_REGISTRY['models.generateContentStream']?.streaming).toBe(true);
15-
expect(GOOGLE_GENAI_METHOD_REGISTRY['chat.sendMessageStream']?.streaming).toBe(true);
16-
expect(GOOGLE_GENAI_METHOD_REGISTRY['models.generateContent']?.streaming).toBeUndefined();
17-
expect(GOOGLE_GENAI_METHOD_REGISTRY['chat.sendMessage']?.streaming).toBeUndefined();
18-
});
19-
});
20-
215
describe('convert google-genai messages to consistent message', () => {
226
it('converts strings to messages', () => {
237
expect(contentUnionToMessages('hello', 'system')).toStrictEqual([{ role: 'system', content: 'hello' }]);

‎packages/core/test/lib/utils/openai-utils.test.ts‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { describe, expect, it } from 'vitest';
22
import { buildMethodPath } from '../../../src/tracing/ai/utils';
3-
import { OPENAI_METHOD_REGISTRY } from '../../../src/tracing/openai/constants';
43
import {
54
isChatCompletionChunk,
65
isChatCompletionResponse,
@@ -10,35 +9,6 @@ import {
109
} from '../../../src/tracing/openai/utils';
1110

1211
describe('openai-utils', () => {
13-
describe('OPENAI_METHOD_REGISTRY', () => {
14-
it('should map chat.completions.create to chat operation', () => {
15-
expect(OPENAI_METHOD_REGISTRY['chat.completions.create']?.operation).toBe('chat');
16-
});
17-
18-
it('should map responses.create to chat operation', () => {
19-
expect(OPENAI_METHOD_REGISTRY['responses.create']?.operation).toBe('chat');
20-
});
21-
22-
it('should map conversations.create to chat operation', () => {
23-
expect(OPENAI_METHOD_REGISTRY['conversations.create']?.operation).toBe('chat');
24-
});
25-
26-
it('should map embeddings.create to embeddings operation', () => {
27-
expect(OPENAI_METHOD_REGISTRY['embeddings.create']?.operation).toBe('embeddings');
28-
});
29-
30-
it('should return undefined for unknown methods', () => {
31-
expect(OPENAI_METHOD_REGISTRY['unknown.method']).toBeUndefined();
32-
expect(OPENAI_METHOD_REGISTRY['']).toBeUndefined();
33-
});
34-
35-
it('should not have any streaming methods', () => {
36-
for (const entry of Object.values(OPENAI_METHOD_REGISTRY)) {
37-
expect(entry.streaming).toBeUndefined();
38-
}
39-
});
40-
});
41-
4212
describe('buildMethodPath', () => {
4313
it('should build method path correctly', () => {
4414
expect(buildMethodPath('', 'chat')).toBe('chat');

0 commit comments

Comments
 (0)