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
This commit is contained in:
jango-blockchained
2025-02-03 00:21:55 +01:00
parent 11cea5b200
commit bd7e206b96
4 changed files with 1 additions and 84 deletions

1
.gitignore vendored
View File

@@ -2,6 +2,7 @@
node_modules node_modules
dist dist
__pycache__/ __pycache__/
.mypy_cache/
*.py[cod] *.py[cod]
*$py.class *$py.class
*.so *.so

View File

@@ -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: ['<rootDir>/jest.setup.ts'],
testMatch: ['**/__tests__/**/*.test.ts'],
collectCoverage: true,
coverageDirectory: 'coverage',
transformIgnorePatterns: [
'node_modules/(?!(chalk|#ansi-styles|#supports-color)/)'
]
};

View File

@@ -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

View File

@@ -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,
}));