forked from zsviczian/obsidian-excalidraw-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (37 loc) · 943 Bytes
/
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
module.exports = {
preset: 'ts-jest',
projects: [
{
displayName: 'jsdom',
testEnvironment: 'jsdom',
testMatch: ['<rootDir>/__tests__/jsdom/*.test.ts'],
setupFilesAfterEnv: ['<rootDir>/__mocks__/obsidian.ts'],
moduleNameMapper: {
'^obsidian$': '<rootDir>/__mocks__/obsidian.ts',
},
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
},
{
displayName: 'node',
testEnvironment: 'node',
testMatch: ['<rootDir>/__tests__/node/*.test.ts'],
setupFilesAfterEnv: ['<rootDir>/__mocks__/obsidian.ts'],
moduleNameMapper: {
'^obsidian$': '<rootDir>/__mocks__/obsidian.ts',
},
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
},
],
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['text-summary', 'text', 'lcov'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
};