-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathjest.config.mjs
More file actions
23 lines (23 loc) · 898 Bytes
/
jest.config.mjs
File metadata and controls
23 lines (23 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export default {
// verbose: true, // Uncomment for detailed test output
collectCoverage: true,
coverageDirectory: 'coverage',
testEnvironment: 'jsdom',
testEnvironmentOptions: {
customExportConditions: ['node'],
},
transform: {
'^.+\\.[tj]sx?$': ['babel-jest', { configFile: './babel.config.mjs' }],
},
// Some npm packages publish ESM sources. By default Jest will NOT transform
// files in node_modules which causes syntax errors like "import ..." here.
// Allow transforming mime-types and mime-db so Babel can compile them for tests.
transformIgnorePatterns: ['/node_modules/(?!(mime-types|mime-db)/)'],
setupFilesAfterEnv: ['./test/jest.setup.ts'],
testMatch: ['**/test/**/*.test.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
roots: ['<rootDir>/src', '<rootDir>/test'],
moduleNameMapper: {
'^SolidLogic$': 'solid-logic',
'^\\$rdf$': 'rdflib'
},
}