const path = require ( 'path' ) ; type { import ( 'ts-jest/dist/types' ) . InitialOptionsTsJest } module . exports = { roots : [ 'src/' , 'tests/' ] , transform : { '^.+\\.tsx?$' : 'ts-jest' , '^.+\\.jsx?$' : [ 'babel-jest' , { configFile : path . resolve ( __dirname , 'babel.config.js' ) } , ] , } , globals : { 'ts-jest' : { tsconfig : '<rootDir>/tsconfig.tests.json' , } , } , preset : 'ts-jest' , testRegex : '(/tests/.*|(\\.|/)(test|spec))\\.([jt]sx?)$' , testPathIgnorePatterns : [ 'dist' , 'lib' , '.*.d.ts' , 'tests/helpers' ] , collectCoverageFrom : [ 'src/**/*.{js,jsx,ts,tsx}' , '!/node_modules/' ] , transformIgnorePatterns : [ 'node_modules/(?!@botonic|escape-string-regexp).+\\.(js|jsx)$' , ] , moduleFileExtensions : [ 'ts' , 'tsx' , 'js' , 'jsx' , 'json' ] , snapshotSerializers : [ ] , setupFilesAfterEnv : [ '<rootDir>/jest.setup.js' , ] , modulePaths : [ 'node_modules' , 'src' ] , moduleNameMapper : { '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$' : '@botonic/dx/baseline/tests/__mocks__/file-mock.js' , '\\.(css|less|scss|sass)$' : 'identity-obj-proxy' , } , testEnvironment : 'node' , } ;