nextui/jest.config.js

27 lines
673 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",
],
}