From bd7e206b96569b1382eaef0da8a5697fc7303b8f Mon Sep 17 00:00:00 2001 From: jango-blockchained Date: Mon, 3 Feb 2025 00:21:55 +0100 Subject: [PATCH] Remove Jest configuration and setup files - Deleted Jest configuration file (jest.config.js) - Removed Jest setup files for CommonJS and ES modules - Added .mypy_cache/ to .gitignore for Python type checking cache --- .gitignore | 1 + jest.config.js | 21 --------------------- jest.setup.cjs | 32 -------------------------------- jest.setup.js | 31 ------------------------------- 4 files changed, 1 insertion(+), 84 deletions(-) delete mode 100644 jest.config.js delete mode 100644 jest.setup.cjs delete mode 100644 jest.setup.js diff --git a/.gitignore b/.gitignore index 10051d7..662409f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules dist __pycache__/ +.mypy_cache/ *.py[cod] *$py.class *.so diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index c0179a7..0000000 --- a/jest.config.js +++ /dev/null @@ -1,21 +0,0 @@ -/** @type {import('jest').Config} */ -module.exports = { - preset: 'ts-jest', - testEnvironment: 'node', - moduleNameMapper: { - '^(\\.{1,2}/.*)\\.js$': '$1', - }, - transform: { - '^.+\\.tsx?$': ['ts-jest', { - useESM: true - }] - }, - extensionsToTreatAsEsm: ['.ts'], - setupFilesAfterEnv: ['/jest.setup.ts'], - testMatch: ['**/__tests__/**/*.test.ts'], - collectCoverage: true, - coverageDirectory: 'coverage', - transformIgnorePatterns: [ - 'node_modules/(?!(chalk|#ansi-styles|#supports-color)/)' - ] -}; \ No newline at end of file diff --git a/jest.setup.cjs b/jest.setup.cjs deleted file mode 100644 index 68ceecd..0000000 --- a/jest.setup.cjs +++ /dev/null @@ -1,32 +0,0 @@ -// Mock chalk module -jest.mock('chalk', () => ({ - default: { - red: (text) => text, - green: (text) => text, - yellow: (text) => text, - blue: (text) => text, - magenta: (text) => text, - cyan: (text) => text, - white: (text) => text, - gray: (text) => text, - grey: (text) => text, - black: (text) => text, - bold: (text) => text, - dim: (text) => text, - italic: (text) => text, - underline: (text) => text, - inverse: (text) => text, - hidden: (text) => text, - strikethrough: (text) => text, - visible: (text) => text, - } -})); - -// Mock environment variables -process.env.HASS_URL = 'http://localhost:8123'; -process.env.HASS_TOKEN = 'test_token'; -process.env.CLAUDE_API_KEY = 'test_api_key'; -process.env.CLAUDE_MODEL = 'test_model'; - -// Global Jest settings -jest.setTimeout(30000); // 30 seconds timeout \ No newline at end of file diff --git a/jest.setup.js b/jest.setup.js deleted file mode 100644 index 2a8f9d7..0000000 --- a/jest.setup.js +++ /dev/null @@ -1,31 +0,0 @@ -import { jest } from '@jest/globals'; - -// Mock environment variables -process.env.HASS_URL = 'http://localhost:8123'; -process.env.HASS_TOKEN = 'test_token'; -process.env.CLAUDE_API_KEY = 'test_api_key'; -process.env.CLAUDE_MODEL = 'test_model'; - -// Global Jest settings -jest.setTimeout(30000); // 30 seconds timeout - -// Mock semver to avoid the SemVer constructor issue -jest.mock('semver', () => ({ - default: class SemVer { - constructor(version) { - this.version = version; - } - toString() { - return this.version; - } - }, - valid: (v) => v, - clean: (v) => v, - satisfies: () => true, - gt: () => false, - gte: () => true, - lt: () => false, - lte: () => true, - eq: () => true, - neq: () => false, -})); \ No newline at end of file