Files
claude-hub/jest.config.js
Cheffromspace 12e4589169 Fix: Merge entrypoint scripts and fix auto-tagging tool permissions (#146)
* fix: merge entrypoint scripts and fix auto-tagging tool permissions

- Merged duplicate claudecode-entrypoint.sh and claudecode-tagging-entrypoint.sh scripts
- Added dynamic tool selection based on OPERATION_TYPE environment variable
- Fixed auto-tagging permissions to include required Bash(gh:*) commands
- Removed 95% code duplication between entrypoint scripts
- Simplified claudeService.ts to use unified entrypoint
- Auto-tagging now uses: Read,GitHub,Bash(gh issue edit:*),Bash(gh issue view:*),Bash(gh label list:*)
- General operations continue to use full tool set

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update Dockerfile to use unified entrypoint script

- Remove references to deleted claudecode-tagging-entrypoint.sh
- Update build process to use single unified entrypoint script

* fix: remove unnecessary async from promisify mock to fix lint error

* feat: add Husky pre-commit hooks with Prettier as primary formatter

- Added Husky for Git pre-commit hooks
- Configured eslint-config-prettier to avoid ESLint/Prettier conflicts
- Prettier handles all formatting, ESLint handles code quality only
- Pre-commit hooks: Prettier format, ESLint check, TypeScript check
- Updated documentation with pre-commit hook setup
- All code quality issues resolved

* feat: consolidate workflows and fix permission issues with clean Docker runners

- Replace 3 complex workflows with 2 lean ones (pull-request.yml, main.yml)
- Add Docker runner configuration for clean, isolated builds
- Remove file permission hacks - use ephemeral containers instead
- Split workload: GitHub-hosted for tests/security, self-hosted for Docker builds
- Add comprehensive pre-commit configuration for security
- Update documentation to be more pragmatic
- Fix credential file permissions and security audit

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: allow Husky prepare script to fail in production builds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update CI badge to reference new main.yml workflow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-31 20:53:58 -05:00

38 lines
1.0 KiB
JavaScript

module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
setupFiles: ['<rootDir>/test/setup.js'],
testMatch: [
'**/test/unit/**/*.test.{js,ts}',
'**/test/integration/**/*.test.{js,ts}',
'**/test/e2e/scenarios/**/*.test.{js,ts}'
],
transform: {
'^.+\\.ts$': 'ts-jest',
'^.+\\.js$': 'babel-jest'
},
moduleFileExtensions: ['ts', 'js', 'json'],
transformIgnorePatterns: [
'node_modules/(?!(universal-user-agent|@octokit|before-after-hook)/)'
],
collectCoverage: true,
coverageReporters: ['text', 'lcov'],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: [
'/node_modules/',
'/dist/',
'/coverage/'
],
collectCoverageFrom: [
'src/**/*.{js,ts}',
'!src/**/*.d.ts',
'!**/node_modules/**',
'!**/dist/**'
],
testTimeout: 30000, // Some tests might take longer due to container initialization
verbose: true,
reporters: [
'default',
['jest-junit', { outputDirectory: 'test-results/jest', outputName: 'results.xml' }]
]
};