nextui/jest.config.js
Ryo Matsukawa 8de427b81a
fix: prevent test matcher warning (#3893)
* fix: prevent test matcher warning

* chore: add node types

* chore: update Jest related packages

* chore: run pnpm install
2024-10-29 00:44:08 +08:00

24 lines
699 B
JavaScript

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