mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:41:09 +02:00
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) <noreply@anthropic.com>
This commit is contained in:
parent
996ec81a0e
commit
983da8540e
2 changed files with 4 additions and 76 deletions
|
|
@ -1,72 +0,0 @@
|
|||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
// Use multiple projects for different types of tests
|
||||
projects: [
|
||||
{
|
||||
displayName: 'backend',
|
||||
testMatch: ['<rootDir>/apps/*/apps/backend/**/*.spec.ts', '<rootDir>/services/**/*.spec.ts'],
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
moduleNameMapper: {
|
||||
'^@/(.*)$': '<rootDir>/src/$1',
|
||||
'^@manacore/(.*)$': '<rootDir>/packages/$1',
|
||||
},
|
||||
coverageDirectory: '<rootDir>/coverage/backend',
|
||||
collectCoverageFrom: [
|
||||
'apps/*/apps/backend/src/**/*.ts',
|
||||
'services/**/src/**/*.ts',
|
||||
'!**/*.spec.ts',
|
||||
'!**/*.d.ts',
|
||||
'!**/node_modules/**',
|
||||
'!**/dist/**',
|
||||
],
|
||||
},
|
||||
{
|
||||
displayName: 'mobile',
|
||||
testMatch: ['<rootDir>/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: {
|
||||
'^@/(.*)$': '<rootDir>/src/$1',
|
||||
'^@manacore/(.*)$': '<rootDir>/packages/$1',
|
||||
},
|
||||
coverageDirectory: '<rootDir>/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: ['<rootDir>/packages/**/*.{test,spec}.ts'],
|
||||
preset: 'ts-jest',
|
||||
testEnvironment: 'node',
|
||||
moduleNameMapper: {
|
||||
'^@manacore/(.*)$': '<rootDir>/packages/$1',
|
||||
},
|
||||
coverageDirectory: '<rootDir>/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,
|
||||
};
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue