-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
38 lines (37 loc) · 1.07 KB
/
Copy pathjest.config.js
File metadata and controls
38 lines (37 loc) · 1.07 KB
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
const path = require('node:path');
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.test.ts'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
collectCoverageFrom: [
'backend/convex/**/*.ts',
'packages/shared/**/*.ts',
'!**/__tests__/**',
'!**/_generated/**',
'!**/node_modules/**',
],
coveragePathIgnorePatterns: ['/node_modules/', '/_generated/', '/__tests__/'],
moduleNameMapper: {
'^@polybuys/shared$': '<rootDir>/packages/shared',
},
// Explicitly configure transforms
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
diagnostics: false,
tsconfig: {
module: 'commonjs',
esModuleInterop: true,
allowSyntheticDefaultImports: true,
},
},
],
'^.+\\.jsx?$': ['babel-jest', { configFile: path.resolve(__dirname, 'babel.jest.config.js') }],
},
// Transform ES module packages from node_modules with babel
transformIgnorePatterns: [
'node_modules/(?!(convex-test|convex|@convex-dev/expo-push-notifications)/)',
],
};