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:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,6 +2,7 @@
|
|||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
.mypy_cache/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
*$py.class
|
*$py.class
|
||||||
*.so
|
*.so
|
||||||
|
|||||||
@@ -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)/)'
|
|
||||||
]
|
|
||||||
};
|
|
||||||
@@ -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
|
|
||||||
@@ -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,
|
|
||||||
}));
|
|
||||||
Reference in New Issue
Block a user