Files
TJWaterFrontend_Refine/jest.config.js
jiang a9b25b94d8
Generic Container CI/CD / test-build-publish (push) Successful in 2m20s
Frontend CI/CD v2 / build-test-publish-and-deploy (push) Successful in 2m20s
feat(3d): refine scene controls and camera views
Keep the control panel geometry stable when toggling building context, and use accessible switch controls to prevent focus-driven movement. Add browser coverage for camera framing, opacity, responsive layout, and the default 6x pipe scale.
2026-09-14 15:41:44 +08:00

32 lines
1.2 KiB
JavaScript

const nextJest = require('next/jest')
const createJestConfig = nextJest({
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
dir: './',
})
// Add any custom config to be passed to Jest
const customJestConfig = {
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironment: 'jest-environment-jsdom',
testPathIgnorePatterns: ['<rootDir>/e2e/'],
moduleNameMapper: {
'^@pages/(.*)$': '<rootDir>/pages/$1',
'^@/(.*)$': '<rootDir>/src/$1',
'^@app/(.*)$': '<rootDir>/src/app/$1',
'^@assets/(.*)$': '<rootDir>/src/assets/$1',
'^@components/(.*)$': '<rootDir>/src/components/$1',
'^@config/(.*)$': '<rootDir>/src/config/$1',
'^@contexts/(.*)$': '<rootDir>/src/contexts/$1',
'^@interfaces/(.*)$': '<rootDir>/src/interfaces/$1',
'^@libs/(.*)$': '<rootDir>/src/libs/$1',
'^@providers/(.*)$': '<rootDir>/src/providers/$1',
'^@utils/(.*)$': '<rootDir>/src/utils/$1',
// Handle specific aliases if generic one causes issues, but trying generic first matching tsconfig
// '^@(.*)$': '<rootDir>/src/$1',
},
}
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
module.exports = createJestConfig(customJestConfig)