From 983da8540eb1a77302991fad662470aa761a4ba6 Mon Sep 17 00:00:00 2001 From: Till JS Date: Thu, 2 Apr 2026 14:11:03 +0200 Subject: [PATCH] chore: remove orphaned jest.config.js, raise vitest coverage to 70% - Delete jest.config.js (no jest dependency in any package.json, was dead config) - Vitest is the sole test runner (already used by all packages) - Raise coverage thresholds from 50% to 70% (lines, functions, branches, statements) Co-Authored-By: Claude Opus 4.6 (1M context) --- jest.config.js | 72 ------------------------------------------------ vitest.config.ts | 8 +++--- 2 files changed, 4 insertions(+), 76 deletions(-) delete mode 100644 jest.config.js diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 4a8d23cff..000000000 --- a/jest.config.js +++ /dev/null @@ -1,72 +0,0 @@ -/** @type {import('jest').Config} */ -module.exports = { - // Use multiple projects for different types of tests - projects: [ - { - displayName: 'backend', - testMatch: ['/apps/*/apps/backend/**/*.spec.ts', '/services/**/*.spec.ts'], - preset: 'ts-jest', - testEnvironment: 'node', - moduleNameMapper: { - '^@/(.*)$': '/src/$1', - '^@manacore/(.*)$': '/packages/$1', - }, - coverageDirectory: '/coverage/backend', - collectCoverageFrom: [ - 'apps/*/apps/backend/src/**/*.ts', - 'services/**/src/**/*.ts', - '!**/*.spec.ts', - '!**/*.d.ts', - '!**/node_modules/**', - '!**/dist/**', - ], - }, - { - displayName: 'mobile', - testMatch: ['/apps/*/apps/mobile/**/*.test.{ts,tsx}'], - preset: 'jest-expo', - transformIgnorePatterns: [ - 'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)', - ], - moduleNameMapper: { - '^@/(.*)$': '/src/$1', - '^@manacore/(.*)$': '/packages/$1', - }, - coverageDirectory: '/coverage/mobile', - collectCoverageFrom: [ - 'apps/*/apps/mobile/src/**/*.{ts,tsx}', - 'apps/*/apps/mobile/app/**/*.{ts,tsx}', - '!**/*.test.{ts,tsx}', - '!**/*.d.ts', - '!**/node_modules/**', - ], - }, - { - displayName: 'shared', - testMatch: ['/packages/**/*.{test,spec}.ts'], - preset: 'ts-jest', - testEnvironment: 'node', - moduleNameMapper: { - '^@manacore/(.*)$': '/packages/$1', - }, - coverageDirectory: '/coverage/shared', - collectCoverageFrom: [ - 'packages/**/src/**/*.ts', - '!**/*.test.ts', - '!**/*.spec.ts', - '!**/*.d.ts', - '!**/node_modules/**', - ], - }, - ], - coverageThresholds: { - global: { - lines: 50, - functions: 50, - branches: 50, - statements: 50, - }, - }, - maxWorkers: '50%', - verbose: true, -}; diff --git a/vitest.config.ts b/vitest.config.ts index cebdd5ff2..d67745376 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -24,10 +24,10 @@ export default defineConfig({ '**/test/**', ], thresholds: { - lines: 50, - functions: 50, - branches: 50, - statements: 50, + lines: 70, + functions: 70, + branches: 70, + statements: 70, }, }, testTimeout: 10000,