refactor: update TypeScript configuration and test utilities for improved type safety

- Modify tsconfig.json to relax strict type checking for gradual migration
- Update test files to use more flexible type checking and mocking
- Add type-safe mock and test utility functions
- Improve error handling and type inference in test suites
- Export Tool interface and tools list for better testing support
This commit is contained in:
jango-blockchained
2025-02-05 09:16:21 +01:00
parent eefbf790c3
commit 4e9ebbbc2c
21 changed files with 526 additions and 532 deletions

View File

@@ -45,8 +45,8 @@ const PORT = parseInt(process.env.PORT || "4000", 10);
console.log("Initializing Home Assistant connection...");
// Define Tool interface
interface Tool {
// Define Tool interface and export it
export interface Tool {
name: string;
description: string;
parameters: z.ZodType<any>;
@@ -167,3 +167,6 @@ process.on("SIGTERM", async () => {
}
process.exit(0);
});
// Export tools for testing purposes
export { tools };