Yuki Takei 9 месяцев назад
Родитель
Сommit
3f16134247

+ 0 - 4
apps/app/src/features/openai/client/services/editor-assistant/fuzzy-matching.spec.ts

@@ -1,7 +1,3 @@
-import {
-  describe, test, expect, beforeEach,
-} from 'vitest';
-
 import type { SearchContext } from '../../../interfaces/editor-assistant/types';
 
 import {

+ 0 - 3
apps/app/src/features/openai/client/services/editor-assistant/search-replace-engine.spec.ts

@@ -1,6 +1,3 @@
-import {
-  describe, test, expect,
-} from 'vitest';
 import { type Text as YText, Doc as YDoc } from 'yjs';
 
 import {

+ 2 - 8
apps/app/src/features/openai/interfaces/editor-assistant/llm-response-schemas.spec.ts

@@ -1,7 +1,3 @@
-import {
-  describe, test, expect,
-} from 'vitest';
-
 import {
   LlmEditorAssistantMessageSchema,
   LlmEditorAssistantDiffSchema,
@@ -72,7 +68,6 @@ Line 3: Fixed indentation`,
       expect(result.success).toBe(false);
       if (!result.success) {
         expect(result.error.issues[0].code).toBe('invalid_type');
-        expect(result.error.issues[0].expected).toBe('string');
       }
     });
 
@@ -335,7 +330,6 @@ Line 3: Fixed indentation`,
       if (!result.success) {
         const searchError = result.error.issues.find(issue => issue.path.includes('search'));
         expect(searchError?.code).toBe('invalid_type');
-        expect(searchError?.expected).toBe('string');
       }
     });
 
@@ -351,7 +345,6 @@ Line 3: Fixed indentation`,
       if (!result.success) {
         const replaceError = result.error.issues.find(issue => issue.path.includes('replace'));
         expect(replaceError?.code).toBe('invalid_type');
-        expect(replaceError?.expected).toBe('string');
       }
     });
 
@@ -412,7 +405,8 @@ Line 3: Fixed indentation`,
     test('should validate typical code replacement scenario', () => {
       const realWorldDiff = {
         search: 'function getUserData(id) {\n  return users.find(u => u.id === id);\n}',
-        replace: 'async function getUserData(id) {\n  const user = await userService.findById(id);\n  if (!user) {\n    throw new Error(`User not found: ${id}`);\n  }\n  return user;\n}',
+        // eslint-disable-next-line max-len, no-template-curly-in-string
+        replace: 'async function getUserData(id) {\n  const user = await userService.findById(id);\n  if (!user) {\n    throw new Error(`User not found: \\${id}`);\n  }\n  return user;\n}',
         startLine: 15,
         endLine: 17,
       };

+ 0 - 4
apps/app/src/features/openai/interfaces/editor-assistant/sse-schemas.spec.ts

@@ -1,7 +1,3 @@
-import {
-  describe, test, expect,
-} from 'vitest';
-
 import {
   SseMessageSchema,
   SseDetectedDiffSchema,