mirror of
https://github.com/johndoe6345789/docker-swarm-termina.git
synced 2026-04-24 13:45:01 +00:00
- 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
33 lines
730 B
JavaScript
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)
|