Files
homeassistant-mcp/jest.config.ts
jango-blockchained a53cec7b28 chore: migrate project to Bun testing framework and update configuration
- Replace Jest with Bun's native testing framework
- Update test configuration and utilities to support Bun test environment
- Add mock implementations for SSE and security testing
- Refactor test setup to use Bun's testing utilities
- Update package dependencies and scripts to align with Bun testing
- Enhance type definitions for Bun test mocking
2025-02-03 22:19:43 +01:00

37 lines
861 B
TypeScript

import type { JestConfigWithTsJest } from 'ts-jest';
const config: JestConfigWithTsJest = {
preset: 'ts-jest',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
tsconfig: 'tsconfig.json',
},
],
},
testMatch: ['**/__tests__/**/*.test.ts'],
verbose: true,
clearMocks: true,
resetMocks: true,
restoreMocks: true,
testTimeout: 30000,
maxWorkers: '50%',
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov'],
globals: {
'ts-jest': {
useESM: true,
isolatedModules: true,
},
},
};
export default config;