feat: Add comprehensive optimization report for Tarot MCP Server
- Implemented performance optimizations including improved singleton pattern and card lookup efficiency. - Enhanced error handling with a unified error type system and context-aware error messages. - Introduced a strong type validation framework for input validation, including sanitization functions. - Improved code quality through consistent formatting, ES module compatibility, and enhanced documentation. - Expanded test coverage with detailed tests for reading manager and error handling scenarios. - Created a simple test runner to validate optimizations and performance metrics.
This commit is contained in:
12
jest-crypto-mock.js
Normal file
12
jest-crypto-mock.js
Normal file
@@ -0,0 +1,12 @@
|
||||
// Mock crypto for Jest testing environment
|
||||
Object.defineProperty(global, 'crypto', {
|
||||
value: {
|
||||
getRandomValues: function(array) {
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
array[i] = Math.floor(Math.random() * 0xffffffff);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
},
|
||||
writable: true
|
||||
});
|
Reference in New Issue
Block a user