test: add comprehensive test suite for Matches & Ratings API
- Created matches.test.js with 24 tests covering: * Match creation and validation * Match listing and filtering * Match acceptance workflow * Match deletion * Rating creation and validation * User ratings display - Fixed Jest ES module issues: * Added mock for jsdom to bypass parse5 compatibility * Added mock for dompurify for test environment * Updated package.json with moduleNameMapper Test results: 19/24 passing (79%) Remaining: 5 tests need investigation
This commit is contained in:
@@ -53,7 +53,11 @@
|
||||
],
|
||||
"testMatch": [
|
||||
"**/__tests__/**/*.test.js"
|
||||
]
|
||||
],
|
||||
"moduleNameMapper": {
|
||||
"^jsdom$": "<rootDir>/src/__mocks__/jsdom.js",
|
||||
"^dompurify$": "<rootDir>/src/__mocks__/dompurify.js"
|
||||
}
|
||||
},
|
||||
"prisma": {
|
||||
"seed": "node prisma/seed.js"
|
||||
|
||||
Reference in New Issue
Block a user