forked from st3v3nmw/obsidian-spaced-repetition
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
40 lines (40 loc) · 1.08 KB
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/** @type {import('@ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
verbose: true,
preset: "ts-jest",
testEnvironment: "jsdom",
setupFilesAfterEnv: ["jest-expect-message"],
moduleNameMapper: {
"src/(.*)": "<rootDir>/src/$1",
},
moduleFileExtensions: ["js", "jsx", "ts", "tsx", "json", "node", "d.ts"],
roots: ["<rootDir>/src/", "<rootDir>/tests/unit/"],
collectCoverageFrom: [
"src/**/lang/*.ts",
"src/NoteEaseList.ts",
"src/NoteFileLoader.ts",
"src/NoteParser.ts",
"src/NoteQuestionParser.ts",
"src/TopicParser.ts",
"src/parser.ts",
"src/scheduling.ts",
"utils.ts",
],
coveragePathIgnorePatterns: [
"/node_modules/",
"src/lang/locale/",
"src/constants",
"src/icons",
"src/declarations.d.ts",
"build",
],
coverageDirectory: "coverage",
collectCoverage: true,
coverageProvider: "v8",
coverageThreshold: {
global: {
statements: 100,
branches: 100,
},
},
};