forked from shepherd-tools/shepherd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.e2e.config.cjs
More file actions
19 lines (19 loc) · 879 Bytes
/
Copy pathjest.e2e.config.cjs
File metadata and controls
19 lines (19 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts', '.mts'],
coveragePathIgnorePatterns: ['\\.mock\\.ts$'],
moduleFileExtensions: ['ts', 'mts', 'tsx', 'js', 'mjs', 'jsx', 'json', 'node'],
testRegex: '(/(__tests__|e2e)/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?|mts)$',
transform: {
'^.+\\.(ts|mts|tsx|js|mjs)?$': 'babel-jest',
'^.+\\.js$': 'babel-jest',
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1', // Map ".js" to ".ts" in imports
},
transformIgnorePatterns: [
'/node_modules/(?!(@octokit|before-after-hook|universal-user-agent|bottleneck|@octokit/core|@octokit/plugin-retry|@octokit/plugin-rest-endpoint-methods|@octokit/plugin-throttling|chalk)/)', // Ensure these node_modules are transformed
],
collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}'], // Collect coverage from src directory
};