forked from st3v3nmw/obsidian-spaced-repetition
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
51 lines (51 loc) · 1.55 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
41
42
43
44
45
46
47
48
49
50
51
/** @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/algorithms/**/*.ts",
"src/dataStore/**/*.ts",
"src/dataStoreAlgorithm/**/*.ts",
"src/NoteEaseList.ts",
"src/NoteFileLoader.ts",
"src/NoteParser.ts",
"src/NoteQuestionParser.ts",
"src/NoteReviewQueue.ts",
"src/OsrCore.ts",
"src/TopicParser.ts",
"src/parser.ts",
"src/scheduling.ts",
"utils.ts",
],
coveragePathIgnorePatterns: [
"/node_modules/",
"src/algorithms/base/ISrsAlgorithm",
"src/algorithms/base/RepItemScheduleInfo",
"src/algorithms/base/SrsAlgorithm",
"src/algorithms/osr/ObsidianVaultNoteLinkInfoFinder",
"src/dataStoreAlgorithm/DataStoreAlgorithm",
"src/dataStoreAlgorithm/IDataStoreAlgorithm",
"src/lang/locale/",
"src/constants",
"src/icons",
"src/declarations.d.ts",
"build",
],
coverageDirectory: "coverage",
collectCoverage: true,
coverageProvider: "v8",
coverageThreshold: {
global: {
statements: 99,
branches: 98,
},
},
};