mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 03:04:03 +00:00
e86ca38f6a
## Test Coverage Achievements - **apiClients.js**: 100% statement coverage ✅ - **configLoader.js**: 100% statement coverage ✅ - **pbsUtils.js**: 100% statement coverage ✅ - **Overall coverage**: 77.97% (up from 77.83%) - **All tests passing**: 116/116 ✅ ## Key Improvements ### Jest Configuration - Fix Jest configuration to use V8 coverage provider instead of Babel - Resolve Babel/Istanbul errors that were preventing tests from running - Add `testEnvironment: "node"` and `coverageProvider: "v8"` settings ### Test Coverage Enhancements - **pbsUtils.js**: Export and test `categorizeAndCountTasks` function for complete coverage - **configLoader.js**: Add test for config directory loading path - **dataFetcher.js**: Add defensive null checking for API clients and comprehensive test fixes - **All test files**: Update test expectations to match current application behavior ### Test Reliability - Fix config tests to match new setup mode behavior instead of error throwing - Update dataFetcher tests for correct API call sequences and error messages - Add proper mock data for backup functionality testing - Resolve test flakiness with proper async handling ### Code Quality - Add null safety check in dataFetcher for missing API client endpoints - Export previously internal function for better testability - Maintain backward compatibility while improving robustness ## Files Changed - `package.json`: Update Jest configuration - `server/pbsUtils.js`: Export categorizeAndCountTasks function - `server/dataFetcher.js`: Add null client validation - `server/tests/*.test.js`: Comprehensive test updates and additions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
63 lines
2.1 KiB
JSON
63 lines
2.1 KiB
JSON
{
|
|
"name": "pulse",
|
|
"version": "3.19.0",
|
|
"description": "A lightweight monitoring application for Proxmox VE.",
|
|
"main": "server/index.js",
|
|
"scripts": {
|
|
"start": "node server/index.js",
|
|
"dev:server": "NODE_ENV=development node -r dotenv/config server/index.js",
|
|
"dev:css": "tailwindcss -c ./src/tailwind.config.js -i ./src/index.css -o ./src/public/output.css --watch",
|
|
"build:css": "NODE_ENV=production tailwindcss -c ./src/tailwind.config.js -i ./src/index.css -o ./src/public/output.css",
|
|
"dev": "concurrently --kill-others --kill-others-on-fail \"npm:dev:server\" \"npm:dev:css\"",
|
|
"test": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --coverage",
|
|
"screenshot": "node scripts/take-screenshots.js"
|
|
},
|
|
"keywords": [
|
|
"proxmox",
|
|
"monitoring",
|
|
"dashboard",
|
|
"nodejs",
|
|
"vuejs"
|
|
],
|
|
"author": "Richard Courtman",
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"axios": "^1.9.0",
|
|
"axios-retry": "^4.5.0",
|
|
"compression": "^1.7.5",
|
|
"concurrently": "^9.1.2",
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^16.5.0",
|
|
"express": "^5.1.0",
|
|
"nodemailer": "^7.0.3",
|
|
"p-limit": "^6.2.0",
|
|
"semver": "^7.7.2",
|
|
"socket.io": "^4.7.2",
|
|
"sqlite3": "^5.1.7",
|
|
"tar": "^7.4.3"
|
|
},
|
|
"_comment_tailwind_v3_reason": "Using Tailwind CSS v3 (3.4.4) due to build inconsistencies observed with v4 (specifically 4.1.4). v4 resulted in incorrectly purged CSS files when built within certain Linux environments (e.g., Proxmox LXC - Debian 12 x86_64), failing to detect dynamically added classes. v3.4.4 builds correctly.",
|
|
"devDependencies": {
|
|
"@gradin/tailwindcss-scrollbar": "^3.0.1",
|
|
"autoprefixer": "^10.4.21",
|
|
"chokidar": "^4.0.3",
|
|
"concurrently": "^9.1.2",
|
|
"conventional-changelog-cli": "^5.0.0",
|
|
"cross-env": "^7.0.3",
|
|
"jest": "^29.7.0",
|
|
"playwright": "^1.52.0",
|
|
"postcss": "^8.5.3",
|
|
"tailwindcss": "^3.4.4"
|
|
},
|
|
"jest": {
|
|
"testEnvironment": "node",
|
|
"coverageProvider": "v8",
|
|
"transformIgnorePatterns": [
|
|
"/node_modules/(?!p-limit|yocto-queue)/"
|
|
]
|
|
},
|
|
"overrides": {
|
|
"glob": "^10.4.5"
|
|
}
|
|
}
|