-
Notifications
You must be signed in to change notification settings - Fork 455
/
jest-src.config.ts
41 lines (38 loc) · 1.19 KB
/
jest-src.config.ts
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
// /** @type {import('./dist').JestConfigWithTsJest} */
// module.exports = {
// collectCoverageFrom: ['src/**/*.ts'],
// modulePathIgnorePatterns: ['examples/.*', 'website/.*'],
// setupFilesAfterEnv: ['<rootDir>/src/__helpers__/setup-jest.ts'],
// snapshotSerializers: [require.resolve('jest-snapshot-serializer-raw')],
// testPathIgnorePatterns: ['src/__mocks__/*', '/node_modules/', '/examples/', '/e2e/.*/__tests__', '\\.snap$'],
// transform: {
// '^.+.tsx?$': [
// '<rootDir>/legacy.js',
// {
// tsconfig: 'tsconfig.spec.json',
// isolatedModules: true,
// },
// ],
// },
// coverageProvider: 'v8',
// }
import { type JestConfigWithTsJest, TS_TRANSFORM_PATTERN } from './src'
import './scripts/create-bundle.js'
const config: JestConfigWithTsJest = {
collectCoverageFrom: ['src/**/*.ts'],
setupFilesAfterEnv: ['<rootDir>/src/__helpers__/setup-jest.ts'],
testMatch: ['<rootDir>/src/**/*.spec.ts'],
transform: {
[TS_TRANSFORM_PATTERN]: [
'<rootDir>/dist/index.js',
{
tsconfig: {
target: 'ES2015',
},
isolatedModules: true,
},
],
},
coverageProvider: 'v8',
}
export default config