generated from rdilweb/template-docusaurus-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathjest.config.js
16 lines (15 loc) · 780 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
moduleNameMapper: {
// To deal with annoying css imports that breaks tests
"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js",
// "@theme-original/(.*)": "<rootDir>/node_modules/@docusaurus/theme-classic/lib/theme/$1/index.js"
// https://huafu.github.io/ts-jest/user/config/#paths-mapping
// If you use “baseUrl” and “paths” options in your tsconfig file, you should make sure the “moduleNameMapper” option in your Jest config is setup accordingly.
"^@theme/(.*)$": "<rootDir>/src/theme/$1",
},
collectCoverageFrom: ["src/theme/JSONSchemaViewer/**/*.{js,ts,jsx,tsx}"],
coveragePathIgnorePatterns: ["!*.d.ts"],
}