cloudflare/cloudflare-typescript
Publicmirrored from https://github.com/cloudflare/cloudflare-typescriptAvailable
jest.config.ts
23lines · modecode
| 1 | import type { JestConfigWithTsJest } from 'ts-jest'; |
| 2 | |
| 3 | const config: JestConfigWithTsJest = { |
| 4 | preset: 'ts-jest/presets/default-esm', |
| 5 | testEnvironment: 'node', |
| 6 | transform: { |
| 7 | '^.+\\.(t|j)sx?$': ['@swc/jest', { sourceMaps: 'inline' }], |
| 8 | }, |
| 9 | moduleNameMapper: { |
| 10 | '^cloudflare$': '<rootDir>/src/index.ts', |
| 11 | '^cloudflare/_shims/auto/(.*)$': '<rootDir>/src/_shims/auto/$1-node', |
| 12 | '^cloudflare/(.*)$': '<rootDir>/src/$1', |
| 13 | }, |
| 14 | modulePathIgnorePatterns: [ |
| 15 | '<rootDir>/ecosystem-tests/', |
| 16 | '<rootDir>/dist/', |
| 17 | '<rootDir>/deno/', |
| 18 | '<rootDir>/deno_tests/', |
| 19 | ], |
| 20 | testPathIgnorePatterns: ['scripts'], |
| 21 | }; |
| 22 | |
| 23 | export default config; |
| 24 | |