jest mocking

This commit is contained in:
grinikita
2025-01-18 12:24:04 +03:00
parent c7668aaff9
commit 19c0ef2882
11 changed files with 118 additions and 26 deletions
+3 -6
View File
@@ -21,7 +21,7 @@ const config = {
collectCoverage: true,
// An array of glob patterns indicating a set of files for which coverage information should be collected
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}'],
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}', '!**/__tests__/**/*'],
// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',
@@ -152,7 +152,7 @@ const config = {
// testLocationInResults: false,
// The glob patterns Jest uses to detect test files
testMatch: ['**/?(*.)+(test).[tj]s?(x)']
testMatch: ['**/?(*.)+(test).[tj]s?(x)'],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
@@ -172,10 +172,7 @@ const config = {
// transform: undefined,
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
// "\\\\node_modules\\\\",
// "\\.pnp\\.[^\\\\]+$"
// ],
transformIgnorePatterns: ['\\\\node_modules\\\\(?!(@brojs)/)', '\\.pnp\\.[^\\\\]+$']
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,