/** @type {import('jest').Config} */ module.exports = { preset: 'ts-jest', testEnvironment: 'jsdom', transform: { '^.+\\.tsx?$': [ 'ts-jest', { tsconfig: { module: 'commonjs', target: 'es2020', esModuleInterop: true, allowSyntheticDefaultImports: true, jsx: 'preserve', jsxImportSource: 'solid-js', }, }, ], }, testMatch: ['**/*.spec.ts', '**/*.test.ts'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], testPathIgnorePatterns: ['/node_modules/', '/dist/', '/src/background/old/'], roots: ['/src'], setupFilesAfterEnv: ['/src/setupTests.ts'], moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', '^@super-productivity/plugin-api$': '/node_modules/@super-productivity/plugin-api/src/index.ts', }, };