prettier fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { pathsToModuleNameMapper } from 'ts-jest';
|
||||
import { readFileSync } from 'fs';
|
||||
import { pathsToModuleNameMapper } from 'ts-jest';
|
||||
|
||||
const tsconfig = JSON.parse(readFileSync('./tsconfig.json', 'utf8'));
|
||||
|
||||
@@ -7,7 +7,7 @@ const tsconfig = JSON.parse(readFileSync('./tsconfig.json', 'utf8'));
|
||||
export default {
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
|
||||
|
||||
// Handle module resolution for TypeScript paths
|
||||
moduleNameMapper: {
|
||||
...pathsToModuleNameMapper(tsconfig.compilerOptions.paths, {
|
||||
@@ -17,16 +17,13 @@ export default {
|
||||
'^isikukood$': '<rootDir>/__mocks__/isikukood.ts',
|
||||
'^server-only$': '<rootDir>/__mocks__/server-only.ts',
|
||||
},
|
||||
|
||||
|
||||
// Test file patterns
|
||||
testMatch: [
|
||||
'**/__tests__/**/*.(ts|tsx|js)',
|
||||
'**/*.(test|spec).(ts|tsx|js)'
|
||||
],
|
||||
|
||||
testMatch: ['**/__tests__/**/*.(ts|tsx|js)', '**/*.(test|spec).(ts|tsx|js)'],
|
||||
|
||||
// Setup files
|
||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
||||
|
||||
|
||||
// Coverage configuration
|
||||
collectCoverageFrom: [
|
||||
'lib/**/*.{ts,tsx}',
|
||||
@@ -34,33 +31,31 @@ export default {
|
||||
'components/**/*.{ts,tsx}',
|
||||
'!**/*.d.ts',
|
||||
'!**/node_modules/**',
|
||||
'!**/.next/**'
|
||||
'!**/.next/**',
|
||||
],
|
||||
|
||||
|
||||
// Transform configuration
|
||||
transform: {
|
||||
'^.+\\.(ts|tsx)$': ['ts-jest', {
|
||||
useESM: true,
|
||||
tsconfig: {
|
||||
jsx: 'react-jsx',
|
||||
'^.+\\.(ts|tsx)$': [
|
||||
'ts-jest',
|
||||
{
|
||||
useESM: true,
|
||||
tsconfig: {
|
||||
jsx: 'react-jsx',
|
||||
},
|
||||
},
|
||||
}],
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
// Module file extensions
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
|
||||
|
||||
|
||||
// Ignore patterns
|
||||
testPathIgnorePatterns: [
|
||||
'<rootDir>/.next/',
|
||||
'<rootDir>/node_modules/',
|
||||
],
|
||||
|
||||
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'],
|
||||
|
||||
// Transform ignore patterns for node_modules
|
||||
transformIgnorePatterns: [
|
||||
'node_modules/(?!(.*\\.mjs$))',
|
||||
],
|
||||
|
||||
transformIgnorePatterns: ['node_modules/(?!(.*\\.mjs$))'],
|
||||
|
||||
// ESM support
|
||||
extensionsToTreatAsEsm: ['.ts'],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user