- Added Jest + ts-jest configuration (jest.config.js) - Added global test setup with mocks (tests/setup.ts) - Added trade factory helpers (tests/helpers/trade-factory.ts) - Added 7 test suites covering Position Manager logic: - tp1-detection.test.ts (13 tests) - breakeven-sl.test.ts (9 tests) - adx-runner-sl.test.ts (18 tests) - trailing-stop.test.ts (14 tests) - edge-cases.test.ts (18 tests) - price-verification.test.ts (13 tests) - decision-helpers.test.ts (28 tests) - Added test documentation (tests/README.md) - Updated package.json with Jest dependencies and scripts - All 113 tests pass Co-authored-by: mindesbunister <32161838+mindesbunister@users.noreply.github.com>
51 lines
1.3 KiB
JSON
51 lines
1.3 KiB
JSON
{
|
|
"name": "trading-bot-v4",
|
|
"version": "4.0.0",
|
|
"description": "Autonomous Trading Bot v4 with Drift Protocol and Pyth Network integration",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "next lint",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"test:coverage": "jest --coverage",
|
|
"test:ci": "jest --ci --coverage --reporters=default --reporters=jest-junit"
|
|
},
|
|
"dependencies": {
|
|
"@drift-labs/sdk": "^2.75.0",
|
|
"@prisma/client": "^6.18.0",
|
|
"@pythnetwork/hermes-client": "^1.0.0",
|
|
"@pythnetwork/price-service-client": "^1.3.0",
|
|
"@solana/web3.js": "^1.91.1",
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"autoprefixer": "^10.4.21",
|
|
"bn.js": "^5.2.2",
|
|
"bs58": "^5.0.0",
|
|
"next": "^15.0.0",
|
|
"postcss": "^8.5.6",
|
|
"prisma": "^6.18.0",
|
|
"react": "^18.3.0",
|
|
"react-dom": "^18.3.0",
|
|
"sqlite": "^5.1.1",
|
|
"sqlite3": "^5.1.7",
|
|
"tailwindcss": "^3.4.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bn.js": "^5.2.0",
|
|
"@types/jest": "^29.5.14",
|
|
"@types/node": "^20.11.0",
|
|
"@types/react": "^18.2.0",
|
|
"@types/react-dom": "^18.2.0",
|
|
"jest": "^29.7.0",
|
|
"jest-junit": "^16.0.0",
|
|
"ts-jest": "^29.2.5",
|
|
"ts-node": "^10.9.2",
|
|
"typescript": "^5.3.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=20.0.0"
|
|
}
|
|
}
|