feat: Complete CouchDB test infrastructure migration for route tests
- Fixed 5/7 route test suites (auth, events, reports, rewards, streets) - Updated Jest configuration with global CouchDB mocks - Created comprehensive test helper utilities with proper ID generation - Fixed pagination response format expectations (.data property) - Added proper model method mocks (populate, save, toJSON, etc.) - Resolved ID validation issues for different entity types - Implemented proper CouchDB service method mocking - Updated test helpers to generate valid IDs matching validator patterns Remaining work: - posts.test.js: needs model mocking and response format fixes - tasks.test.js: needs Task model constructor fixes and mocking 🤖 Generated with [AI Assistant] Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "cross-env NODE_ENV=test bun test",
|
||||
"test:watch": "cross-env NODE_ENV=test bun test --watch",
|
||||
"test:coverage": "cross-env NODE_ENV=test bun test --coverage",
|
||||
"test:verbose": "cross-env NODE_ENV=test bun test --verbose",
|
||||
"test": "cross-env NODE_ENV=test jest",
|
||||
"test:watch": "cross-env NODE_ENV=test jest --watch",
|
||||
"test:coverage": "cross-env NODE_ENV=test jest --coverage",
|
||||
"test:verbose": "cross-env NODE_ENV=test jest --verbose",
|
||||
"start": "bun server.js",
|
||||
"dev": "bunx nodemon server.js",
|
||||
"seed:badges": "bun scripts/seedBadges.js",
|
||||
|
||||
Reference in New Issue
Block a user