mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
first implementation
This commit is contained in:
parent
98efa6f6e8
commit
74dc6892ab
61 changed files with 30899 additions and 4934 deletions
72
jest.config.js
Normal file
72
jest.config.js
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
/** @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,
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue