const path = require('path') /** @type {import('jest').Config} */ module.exports = { setupFilesAfterEnv: [path.join(__dirname, 'packages/core/test/setup.ts')], testEnvironment: 'jsdom', testPathIgnorePatterns: [ '.+/(types|__snapshots__)/.+', '/node_modules/', '/.github/', ], modulePathIgnorePatterns: ['dist', 'cypress'], moduleNameMapper: { '^react$': '/node_modules/react', '@react-spring/(.*)': '/packages/$1/src/index.ts', }, collectCoverageFrom: [ '/packages/{animated,core,rafz,shared}/src/*.{ts,tsx}', '/targets/{web}/src/*.{ts,tsx}', ], coverageDirectory: './coverage', coverageThreshold: { global: { statements: 80, branches: 74, functions: 71, lines: 82, }, }, moduleFileExtensions: ['js', 'ts', 'tsx'], coverageReporters: ['json', 'html', 'text'], fakeTimers: { enableGlobally: true }, transform: { '^.+\\.(t|j)sx?$': '@swc/jest', }, }