Files
docker-swarm-termina/frontend/jest.config.js
Claude cd16fbc6bb Add tests with coverage and e2e to Docker build process
- Update backend Dockerfile with multi-stage build that runs pytest
  with coverage (70% threshold) before production build
- Update frontend Dockerfile with multi-stage build including:
  - Unit test stage with Jest coverage
  - E2E test stage with Playwright
  - Production stage depends on test stages via markers
- Add Playwright e2e tests for login, dashboard, and terminal flows
- Configure Playwright with chromium browser
- Update jest.config.js to exclude e2e directory
- Update docker-compose.yml to target production stage

https://claude.ai/code/session_01XSQJybTpvKyN7td4Y8n5Rm
2026-02-01 17:10:32 +00:00

33 lines
730 B
JavaScript

const nextJest = require('next/jest')
const createJestConfig = nextJest({
dir: './',
})
const customJestConfig = {
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironment: 'jest-environment-jsdom',
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
},
testMatch: [
'**/__tests__/**/*.[jt]s?(x)',
'**/?(*.)+(spec|test).[jt]s?(x)',
],
testPathIgnorePatterns: [
'<rootDir>/node_modules/',
'<rootDir>/.next/',
'<rootDir>/e2e/',
],
collectCoverageFrom: [
'lib/**/*.{js,jsx,ts,tsx}',
'components/**/*.{js,jsx,ts,tsx}',
'app/**/*.{js,jsx,ts,tsx}',
'!**/*.d.ts',
'!**/node_modules/**',
'!**/.next/**',
],
}
module.exports = createJestConfig(customJestConfig)