nextui/jest.config.js
2022-11-06 05:42:45 +08:00

18 lines
635 B
JavaScript

module.exports = {
testEnvironment: "jsdom",
collectCoverageFrom: ["packages/**/*.{ts,tsx}"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
modulePathIgnorePatterns: ["<rootDir>/examples", "<rootDir>/tooling/cra-template*"],
transform: {
"^.+\\.(ts|tsx|js|jsx)?$": "@swc-node/jest",
},
transformIgnorePatterns: ["[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$"],
setupFilesAfterEnv: ["@testing-library/jest-dom/extend-expect", "./scripts/setup-test.ts"],
globals: {
"ts-jest": {
tsconfig: "tsconfig.json",
},
},
watchPlugins: ["jest-watch-typeahead/filename", "jest-watch-typeahead/testname"],
};