Files
SquidSec Bot 26635182de feat: initial security-scan GitHub Action with full unit tests
- Refactored into testable modules (config, prompts, llm, checks)
- Comprehensive unit tests for config loading/merging/overrides,
  severity blocking, prompt construction (OWASP/CWE enforcement),
  LLM JSON extraction (noisy output handling),
  check run annotations, PR comments, filtering
- All claims from spec validated (21 tests)
- Dist bundle included for action consumption
- Private repo under SquidSec for self-hosted runner support
2026-07-28 15:54:21 -04:00

34 lines
802 B
JavaScript

/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src', '<rootDir>/__tests__'],
testMatch: ['**/__tests__/**/*.test.ts', '**/?(*.)+(spec|test).ts'],
transform: {
'^.+\\.ts$': ['ts-jest', {
tsconfig: {
"module": "commonjs",
"esModuleInterop": true,
"strict": true,
"types": ["jest", "node"]
}
}],
},
moduleFileExtensions: ['ts', 'js', 'json'],
collectCoverageFrom: [
'src/**/*.{ts,js}',
'!src/index.ts', // entrypoint with side effects
'!**/node_modules/**',
],
coverageThreshold: {
global: {
branches: 50,
functions: 55,
lines: 55,
statements: 55,
},
},
clearMocks: true,
resetMocks: true,
};