Skip to content

Commit

Permalink
fix: 테스트 설정 찐 마무리
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene028 committed Jul 20, 2024
1 parent fc75fdc commit 75d7737
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
25 changes: 0 additions & 25 deletions packages/shared-config/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,11 @@ import type { Config } from "jest";

const config: Config = {
preset: "ts-jest",
transform: {
"^.+\\.jsx?$": "babel-jest",
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.json",
},
],
},

setupFilesAfterEnv: ["../shared-config/jest.setup.ts"],
verbose: true,
collectCoverage: true,
restoreMocks: true,
testMatch: [
"<rootDir>/src/**/*.test.(js|jsx|ts|tsx)",
"<rootDir>/app/**/*.test.(js|jsx|ts|tsx)",
],
testPathIgnorePatterns: [
"<rootDir>/styled-system/",
"<rootDir>/node-modules/",
],
coveragePathIgnorePatterns: [
"<rootDir>/styled-system/",
"<rootDir>/node-modules/",
],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
"^@styled-system(.*)$": "<rootDir>/styled-system/$1",
},
};

export default config;
18 changes: 17 additions & 1 deletion packages/wow-ui/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,26 @@ const config: Config = {
"^.+\\.tsx?$": [
"ts-jest",
{
tsconfig: "<rootDir>/tsconfig.json", // packages/wow-ui/tsconfig.json을 가리키게 함
tsconfig: "<rootDir>/tsconfig.json",
},
],
},
testMatch: [
"<rootDir>/src/**/*.test.(js|jsx|ts|tsx)",
"<rootDir>/app/**/*.test.(js|jsx|ts|tsx)",
],
testPathIgnorePatterns: [
"<rootDir>/styled-system/",
"<rootDir>/node-modules/",
],
coveragePathIgnorePatterns: [
"<rootDir>/styled-system/",
"<rootDir>/node-modules/",
],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
"^@styled-system(.*)$": "<rootDir>/styled-system/$1",
},
};

export default config;

0 comments on commit 75d7737

Please sign in to comment.