mirror of
https://github.com/laoxong/nofx.git
synced 2026-06-04 01:48:22 +08:00
cf12be74f5
This commit sets up a minimal, KISS-principle testing infrastructure for both backend and frontend, and includes the fix for Issue #227. Backend Changes: - Add Makefile with test commands (test, test-backend, test-frontend, test-coverage) - Add example test: config/database_test.go - Fix Go 1.25 printf format string warnings in trader/auto_trader.go (Changed log.Printf to log.Print for non-format strings) - All backend tests pass ✓ Frontend Changes: - Add Vitest configuration: web/vitest.config.ts (minimal setup) - Add test utilities: web/src/test/test-utils.tsx - Add example test: web/src/App.test.tsx - Add dependencies: vitest, jsdom, @testing-library/react - All frontend tests pass ✓ Issue #227 Fix: - Fix AITradersPage to allow editing traders with disabled models/exchanges - Change validation to use allModels/allExchanges instead of enabledModels/enabledExchanges - Add comprehensive tests in web/src/components/AITradersPage.test.tsx - Fixes: https://github.com/tinkle-community/nofx/issues/227 CI/CD: - Add GitHub Actions workflow: .github/workflows/test.yml - Non-blocking tests (continue-on-error: true) - Runs on push/PR to main and dev branches Test Results: - Backend: 1 test passing - Frontend: 5 tests passing (including 4 for Issue #227) Co-Authored-By: tinkle-community <tinklefund@gmail.com>
39 lines
930 B
JSON
39 lines
930 B
JSON
{
|
|
"name": "nofx-web",
|
|
"version": "1.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc && vite build",
|
|
"preview": "vite preview",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@radix-ui/react-slot": "^1.2.3",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"date-fns": "^4.1.0",
|
|
"framer-motion": "^12.23.24",
|
|
"lucide-react": "^0.552.0",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"recharts": "^2.15.2",
|
|
"swr": "^2.2.5",
|
|
"tailwind-merge": "^3.3.1",
|
|
"zustand": "^5.0.2"
|
|
},
|
|
"devDependencies": {
|
|
"@testing-library/react": "^16.1.0",
|
|
"@types/react": "^18.3.17",
|
|
"@types/react-dom": "^18.3.5",
|
|
"@vitejs/plugin-react": "^4.3.4",
|
|
"autoprefixer": "^10.4.20",
|
|
"jsdom": "^25.0.1",
|
|
"postcss": "^8.4.49",
|
|
"tailwindcss": "^3.4.17",
|
|
"typescript": "^5.8.3",
|
|
"vite": "^6.0.7",
|
|
"vitest": "^2.1.8"
|
|
}
|
|
}
|