@restnfeel/agentc-starter-kit
Version:
한국어 기업용 CMS 모듈 - Task Master AI와 함께 빠르게 웹사이트를 구현할 수 있는 재사용 가능한 컴포넌트 시스템
75 lines (62 loc) • 1.62 kB
JavaScript
/**
* Jest configuration for chatbot module
*/
const config = {
displayName: "Chatbot Library",
testEnvironment: "jsdom",
// Test file patterns
testMatch: [
"<rootDir>/**/__tests__/**/*.(ts|tsx|js|jsx)",
"<rootDir>/**/*.(test|spec).(ts|tsx|js|jsx)",
],
// Transform files with babel-jest
transform: {
"^.+\\.(ts|tsx)$": [
"babel-jest",
{
presets: [
["@babel/preset-env", { targets: { node: "current" } }],
["@babel/preset-react", { runtime: "automatic" }],
"@babel/preset-typescript",
],
},
],
},
// Module name mapping for absolute imports
moduleNameMapping: {
"^@/(.*)$": "<rootDir>/../../../$1",
"^@chatbot/(.*)$": "<rootDir>/$1",
},
// Setup files
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
// Coverage configuration
collectCoverageFrom: [
"**/*.(ts|tsx)",
"!**/*.d.ts",
"!**/__tests__/**",
"!**/node_modules/**",
"!**/*.config.*",
"!**/*.stories.*",
],
coverageThreshold: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70,
},
},
// Ignore patterns
testPathIgnorePatterns: ["/node_modules/", "/dist/", "/coverage/"],
// Mock external dependencies
moduleNameMapping: {
// Mock external UI libraries
"lucide-react": "<rootDir>/__mocks__/lucide-react.js",
// Mock file processing
"pdf-parse": "<rootDir>/__mocks__/pdf-parse.js",
mammoth: "<rootDir>/__mocks__/mammoth.js",
// Mock absolute imports
"^@/(.*)$": "<rootDir>/../../../$1",
},
};
module.exports = config;