mirror of
https://github.com/andwati/blog-nest.git
synced 2026-10-18 05:32:53 +00:00
feat: enhance Docker and environment configurations for development and production
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
/node_modules
|
||||
/build
|
||||
|
||||
generated
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import nextJest from 'next/jest'
|
||||
|
||||
const createJestConfig = nextJest({
|
||||
dir: './',
|
||||
})
|
||||
|
||||
const config = {
|
||||
testEnvironment: 'jsdom',
|
||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
||||
testMatch: ['**/*.spec.ts?(x)'],
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': '<rootDir>/src/$1',
|
||||
},
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.{ts,tsx}',
|
||||
'!src/**/*.spec.{ts,tsx}',
|
||||
'!src/**/layout.tsx',
|
||||
],
|
||||
coverageDirectory: 'coverage',
|
||||
}
|
||||
|
||||
export default createJestConfig(config)
|
||||
@@ -8,7 +8,7 @@ const createJestConfig = nextJest({
|
||||
const config: Config = {
|
||||
testEnvironment: 'jsdom',
|
||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
||||
testRegex: '.*\\.spec\\.tsx?$',
|
||||
testMatch: ['**/*.spec.ts?(x)'],
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': '<rootDir>/src/$1',
|
||||
},
|
||||
|
||||
@@ -25,5 +25,5 @@
|
||||
".next/dev/types/**/*.ts",
|
||||
"**/*.mts"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
"exclude": ["node_modules", "jest.config.ts", "jest.setup.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user