<commit_before>// jest.config.ts
import type { Config } from '@jest/types';

const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig.json');

// Sync object
const config: Config.InitialOptions = {
	moduleFileExtensions: ['js', 'json', 'ts'],
	rootDir: '.',
	/* we have tests in src/...*.spec.ts and test/...*.e2e-spec.ts either we test all files via `npm run nest:test` or override the regex in npm scripts to separate the execution via `npm run nest:test:spec` or `npm run nest:test:e2e` */
	testRegex: '\\.(e2e-)?spec\\.ts$',
	// ignore legacy mocha tests
	testPathIgnorePatterns: ['^src', '^test'],
	transform: {
		'^.+\\.(t|j)s$': 'ts-jest',
	},
	collectCoverageFrom: ['apps/**/*.(t|j)s'],
	coverageDirectory: './coverage',
	coveragePathIgnorePatterns: ['.module.ts$', 'index.ts$', 'spec.ts$'],
	coverageThreshold: {
		global: {
			branches: 80,
			functions: 80,
			lines: 80,
			statements: -5,
		},
		// add custom paths: './apps/server/path...': { branches: X, functions: ... }
	},
	testEnvironment: 'node',
	// detectOpenHandles: true,
	// detectLeaks: true,
	roots: ['<rootDir>/apps/'],
	moduleNameMapper: {
		// add ts-config path's here as regex
		'^@shared/(.*)$': '<rootDir>/apps/server/src/shared/$1',
		'^@src/(.*)$': '<rootDir>/apps/server/src/$1',
	},
};
export default config;<commit_msg>disable coverage thresholds from jest<commit_after>// jest.config.ts
import type { Config } from '@jest/types';

const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig.json');

// Sync object
const config: Config.InitialOptions = {
	moduleFileExtensions: ['js', 'json', 'ts'],
	rootDir: '.',
	/* we have tests in src/...*.spec.ts and test/...*.e2e-spec.ts either we test all files via `npm run nest:test` or override the regex in npm scripts to separate the execution via `npm run nest:test:spec` or `npm run nest:test:e2e` */
	testRegex: '\\.(e2e-)?spec\\.ts$',
	// ignore legacy mocha tests
	testPathIgnorePatterns: ['^src', '^test'],
	transform: {
		'^.+\\.(t|j)s$': 'ts-jest',
	},
	collectCoverageFrom: ['apps/**/*.(t|j)s'],
	coverageDirectory: './coverage',
	coveragePathIgnorePatterns: ['.module.ts$', 'index.ts$', 'spec.ts$'],
	// coverageThreshold: {
	// 	global: {
	// 		branches: 80,
	// 		functions: 80,
	// 		lines: 80,
	// 		statements: -5,
	// 	},
	// 	// add custom paths: './apps/server/path...': { branches: X, functions: ... }
	// },
	testEnvironment: 'node',
	// detectOpenHandles: true,
	// detectLeaks: true,
	roots: ['<rootDir>/apps/'],
	moduleNameMapper: {
		// add ts-config path's here as regex
		'^@shared/(.*)$': '<rootDir>/apps/server/src/shared/$1',
		'^@src/(.*)$': '<rootDir>/apps/server/src/$1',
	},
};
export default config;
{'fraction_non_alphanumeric': 0.21637216011539848, 'fraction_numerical': 0.00865488640461594, 'mean_word_length': 3.67003367003367, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4067323', 'n_tokens_mistral': 1044, 'n_tokens_neox': 977, 'n_words': 237}