translation-terrace/jest.config.ts
2025-01-30 10:41:40 -08:00

19 lines
510 B
TypeScript

// jest.config.ts
import { resolve } from "path"
import { createJsWithBabelPreset, JestConfigWithTsJest } from 'ts-jest'
const jsWithBabelPreset = createJsWithBabelPreset({
tsconfig: 'tsconfig.spec.json',
babelConfig: true,
})
const jestConfig: JestConfigWithTsJest = {
preset: 'react-native',
transform: jsWithBabelPreset.transform,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'^@/(.*)$': resolve("<rootDir>", "$1")
},
}
export default jestConfig