logancyang_obsidian-copilot/jest.config.js

18 lines
528 B
JavaScript
Raw Permalink Normal View History

2023-04-09 05:57:45 +00:00
module.exports = {
2024-08-21 22:16:22 +00:00
preset: "ts-jest",
testEnvironment: "jsdom",
roots: ["<rootDir>/src"],
2023-04-09 05:57:45 +00:00
transform: {
2024-08-21 22:16:22 +00:00
"^.+\\.(js|jsx|ts|tsx)$": "ts-jest",
2023-04-09 05:57:45 +00:00
},
moduleNameMapper: {
2024-08-21 22:16:22 +00:00
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
"^@/(.*)$": "<rootDir>/src/$1",
"^obsidian$": "<rootDir>/__mocks__/obsidian.js",
2023-04-09 05:57:45 +00:00
},
testRegex: ".*\\.test\\.(jsx?|tsx?)$",
2024-08-21 22:16:22 +00:00
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
testPathIgnorePatterns: ["/node_modules/"],
setupFiles: ["<rootDir>/jest.setup.js"],
};