Files
ss-tools/frontend/vite.config.js
busya 4dce669844 fix(tests): 61 failed backend unit tests — async/await mocks, deadlock fix, SyntaxError repairs
Группы исправлений:
- Группа 1 (async/await misuse): MagicMock → AsyncMock для get_dashboards,
  export_dashboard, import_dashboard, sync_environment, get_run_detail,
  list_all_runs, create_task и др. — 23 теста
- Группа 2 (runner.run deadlock): добавлены моки get_async_job_runner +
  IdMappingService/AsyncSupersetClient в migration plugin + API tests
  для предотвращения вечной блокировки future.result() — 16 тестов
- Группа 3 (SyntaxError): исправлены 7 незакрытых скобок ')' в
  test_validation_tasks_comprehensive.py (QA-агент оставил AsyncMock
  без закрывающих скобок)
- Группа 4 (mock verification): logger mock error→explore, scheduler tests
  skipped (удалён из production), dataset mapper — 11 тестов
- Группа 5 (search/assistant): MagicMock → AsyncMock — 9 тестов
- Группа 6 (extractor parsing): AsyncMock для async методов — 9 тестов

Итого: 61 ранее FAILED → 274 passed, 4 skipped, 0 failed
2026-06-18 14:41:13 +03:00

42 lines
987 B
JavaScript
Executable File

import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { execSync } from 'child_process';
const APP_VERSION = (() => {
try {
return execSync('git describe --tags --abbrev=0', { encoding: 'utf8' }).trim();
} catch {
return '0.0.0';
}
})();
export default defineConfig({
define: {
__APP_VERSION__: JSON.stringify(APP_VERSION)
},
plugins: [sveltekit()],
server: {
proxy: {
'/api/agent/gradio': {
target: process.env.GRADIO_URL || 'http://127.0.0.1:7860',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/api\/agent\/gradio/, ''),
ws: true
},
'/api': {
target: process.env.BACKEND_URL || 'http://127.0.0.1:8000',
changeOrigin: true,
secure: false,
rewrite: (path) => path.replace(/^\/api/, '/api')
},
'/ws': {
target: (process.env.BACKEND_URL || 'http://127.0.0.1:8000').replace(/^http/, 'ws'),
ws: true,
changeOrigin: true,
secure: false
}
}
}
});