diff --git a/packages/kbn-dependency-usage/src/dependency_graph/providers/cruiser.test.ts b/packages/kbn-dependency-usage/src/dependency_graph/providers/cruiser.test.ts index e0f0acf7209a8..14ad94f45000a 100644 --- a/packages/kbn-dependency-usage/src/dependency_graph/providers/cruiser.test.ts +++ b/packages/kbn-dependency-usage/src/dependency_graph/providers/cruiser.test.ts @@ -19,15 +19,21 @@ const codeOwners: Record = { 'plugins/data_charts': ['team_visualization'], 'plugins/analytics': ['team_analytics'], 'plugins/notification': ['team_alerts', 'team_notifications'], - 'solutions/security/plugins/security_solution/public/entity_analytics/components': ['team_security_analytics'], + 'solutions/security/plugins/security_solution/public/entity_analytics/components': [ + 'team_security_analytics', + ], 'solutions/security/plugins/security_solution/public/entity_analytics/components/componentA.ts': [ 'team_security_analytics', ], 'solutions/security/plugins/security_solution/public/entity_analytics/components/componentB.ts': [ 'team_security_analytics', ], - 'solutions/security/plugins/security_solution/server/lib/analytics/analytics.ts': ['team_security_analytics'], - 'solutions/security/plugins/security_solution/common/api/detection_engine': ['team_security_solution'], + 'solutions/security/plugins/security_solution/server/lib/analytics/analytics.ts': [ + 'team_security_analytics', + ], + 'solutions/security/plugins/security_solution/common/api/detection_engine': [ + 'team_security_solution', + ], }; jest.mock('dependency-cruiser', () => ({ diff --git a/x-pack/solutions/security/plugins/security_solution/common/jest.config.js b/x-pack/solutions/security/plugins/security_solution/common/jest.config.js index 28f901f8db84b..e5cfc70c6dde6 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/common/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/common', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/common/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/common/**/*.{ts,tsx}', + ], moduleNameMapper: require('../server/__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/app/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/app/jest.config.js index 60e615765297e..41a934d84b16d 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/app/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/app/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public/app', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/public/app/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/public/app/**/*.{ts,tsx}', + ], moduleNameMapper: require('../../server/__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/cases/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/cases/jest.config.js index ffd169c2daa05..cf6bc6e0ead89 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/cases/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/cases/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public/cases', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/public/cases/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/public/cases/**/*.{ts,tsx}', + ], moduleNameMapper: require('../../server/__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture/jest.config.js index 13f93de203b03..de934c750ae5a 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture/jest.config.js @@ -8,7 +8,9 @@ module.exports = { preset: '@kbn/test', rootDir: '../../../../../../..', - roots: ['/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture'], + roots: [ + '/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture', + ], coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public/cloud_security_posture', coverageReporters: ['text', 'html'], diff --git a/x-pack/solutions/security/plugins/security_solution/public/common/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/common/jest.config.js index 8c8154b7101c7..de509516f5538 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/common/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/common/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public/common', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/public/common/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/public/common/**/*.{ts,tsx}', + ], moduleNameMapper: require('../../server/__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/explore/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/explore/jest.config.js index 45474eca30286..996b41f5d9114 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/explore/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/explore/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public/explore', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/public/explore/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/public/explore/**/*.{ts,tsx}', + ], moduleNameMapper: require('../../server/__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/flyout/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/flyout/jest.config.js index f3b8ce5bb14ce..be8045c6b5af1 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/flyout/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/flyout/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public/flyout', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/public/flyout/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/public/flyout/**/*.{ts,tsx}', + ], moduleNameMapper: require('../../server/__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/jest.config.js index 48fb41b20738c..322cf3147f2bc 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/jest.config.js @@ -9,7 +9,9 @@ module.exports = { preset: '@kbn/test', rootDir: '../../../../../..', /** all nested directories have their own Jest config file */ - testMatch: ['/x-pack/solutions/security/plugins/security_solution/public/*.test.{js,mjs,ts,tsx}'], + testMatch: [ + '/x-pack/solutions/security/plugins/security_solution/public/*.test.{js,mjs,ts,tsx}', + ], roots: ['/x-pack/solutions/security/plugins/security_solution/public'], coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public', diff --git a/x-pack/solutions/security/plugins/security_solution/public/notes/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/notes/jest.config.js index 8e6c53720fa1d..c3f3cd3b77735 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/notes/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/notes/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public/notes', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/public/notes/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/public/notes/**/*.{ts,tsx}', + ], moduleNameMapper: require('../../server/__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/overview/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/overview/jest.config.js index 788b05af24369..b7348132cd6af 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/overview/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/overview/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public/overview', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/public/overview/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/public/overview/**/*.{ts,tsx}', + ], moduleNameMapper: require('../../server/__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/resolver/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/resolver/jest.config.js index c465514506ff6..20362b9254459 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/resolver/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/resolver/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public/resolver', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/public/resolver/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/public/resolver/**/*.{ts,tsx}', + ], moduleNameMapper: require('../../server/__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/public/security_integrations/jest.config.js b/x-pack/solutions/security/plugins/security_solution/public/security_integrations/jest.config.js index 8691dd4ff1350..f71f00e8dfd4f 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/security_integrations/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/public/security_integrations/jest.config.js @@ -8,7 +8,9 @@ module.exports = { preset: '@kbn/test', rootDir: '../../../../../../..', - roots: ['/x-pack/solutions/security/plugins/security_solution/public/security_integrations'], + roots: [ + '/x-pack/solutions/security/plugins/security_solution/public/security_integrations', + ], coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/public/security_integrations', coverageReporters: ['text', 'html'], diff --git a/x-pack/solutions/security/plugins/security_solution/scripts/jest.config.js b/x-pack/solutions/security/plugins/security_solution/scripts/jest.config.js index dc1d57e4bd195..a5a3c19eee9e0 100644 --- a/x-pack/solutions/security/plugins/security_solution/scripts/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/scripts/jest.config.js @@ -12,5 +12,7 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/scripts', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/scripts/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/scripts/**/*.{ts,tsx}', + ], }; diff --git a/x-pack/solutions/security/plugins/security_solution/server/__mocks__/module_name_map.js b/x-pack/solutions/security/plugins/security_solution/server/__mocks__/module_name_map.js index 9848481391250..eb94f64d51305 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/__mocks__/module_name_map.js +++ b/x-pack/solutions/security/plugins/security_solution/server/__mocks__/module_name_map.js @@ -8,7 +8,8 @@ // See: https://github.com/elastic/kibana/issues/117255, this moduleNameMapper creates // mocks to avoid memory leaks from kibana core. module.exports = { - '^@kbn/core/server$': '/x-pack/solutions/security/plugins/security_solution/server/__mocks__/core.mock.ts', + '^@kbn/core/server$': + '/x-pack/solutions/security/plugins/security_solution/server/__mocks__/core.mock.ts', '^@kbn/task-manager-plugin/server$': '/x-pack/solutions/security/plugins/security_solution/server/__mocks__/task_manager.mock.ts', '^@kbn/alerting-plugin/server$': diff --git a/x-pack/solutions/security/plugins/security_solution/server/client/jest.config.js b/x-pack/solutions/security/plugins/security_solution/server/client/jest.config.js index 258483951ce52..5b769a23ecb63 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/client/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/server/client/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/server/client', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/server/client/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/server/client/**/*.{ts,tsx}', + ], moduleNameMapper: require('../__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/server/endpoint/jest.config.js b/x-pack/solutions/security/plugins/security_solution/server/endpoint/jest.config.js index 241849cca1489..558473988dc0b 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/endpoint/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/server/endpoint/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/server/endpoint', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/server/endpoint/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/server/endpoint/**/*.{ts,tsx}', + ], moduleNameMapper: require('../__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/server/jest.config.js b/x-pack/solutions/security/plugins/security_solution/server/jest.config.js index 427d2dba52c57..8709a95766831 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/server/jest.config.js @@ -9,11 +9,15 @@ module.exports = { preset: '@kbn/test', rootDir: '../../../../../..', /** all nested directories have their own Jest config file */ - testMatch: ['/x-pack/solutions/security/plugins/security_solution/server/*.test.{js,mjs,ts,tsx}'], + testMatch: [ + '/x-pack/solutions/security/plugins/security_solution/server/*.test.{js,mjs,ts,tsx}', + ], roots: ['/x-pack/solutions/security/plugins/security_solution/server'], coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/server', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/server/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/server/**/*.{ts,tsx}', + ], moduleNameMapper: require('./__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/server/lib/jest.config.js b/x-pack/solutions/security/plugins/security_solution/server/lib/jest.config.js index 7dac49358cf19..e9dc836a6a47c 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/lib/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/server/lib/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/server/lib', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/server/lib/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/server/lib/**/*.{ts,tsx}', + ], moduleNameMapper: require('../__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/server/usage/jest.config.js b/x-pack/solutions/security/plugins/security_solution/server/usage/jest.config.js index e9bd468639cd2..be2b9bb6736b8 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/usage/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/server/usage/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/server/usage', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/server/usage/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/server/usage/**/*.{ts,tsx}', + ], moduleNameMapper: require('../__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution/server/utils/jest.config.js b/x-pack/solutions/security/plugins/security_solution/server/utils/jest.config.js index 400a65ec7f2cf..aac14976a7e7f 100644 --- a/x-pack/solutions/security/plugins/security_solution/server/utils/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution/server/utils/jest.config.js @@ -12,6 +12,8 @@ module.exports = { coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution/server/utils', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/security/plugins/security_solution/server/utils/**/*.{ts,tsx}'], + collectCoverageFrom: [ + '/x-pack/solutions/security/plugins/security_solution/server/utils/**/*.{ts,tsx}', + ], moduleNameMapper: require('../__mocks__/module_name_map'), }; diff --git a/x-pack/solutions/security/plugins/security_solution_ess/jest.config.dev.js b/x-pack/solutions/security/plugins/security_solution_ess/jest.config.dev.js index 578734c8b52d6..7a6d250e65f6d 100644 --- a/x-pack/solutions/security/plugins/security_solution_ess/jest.config.dev.js +++ b/x-pack/solutions/security/plugins/security_solution_ess/jest.config.dev.js @@ -8,5 +8,7 @@ module.exports = { preset: '@kbn/test', rootDir: '../../../../../', - projects: ['/x-pack/solutions/security/plugins/security_solution_ess/public/jest.config.js'], + projects: [ + '/x-pack/solutions/security/plugins/security_solution_ess/public/jest.config.js', + ], }; diff --git a/x-pack/solutions/security/plugins/security_solution_ess/public/jest.config.js b/x-pack/solutions/security/plugins/security_solution_ess/public/jest.config.js index b89695242fff7..81d13b77725ca 100644 --- a/x-pack/solutions/security/plugins/security_solution_ess/public/jest.config.js +++ b/x-pack/solutions/security/plugins/security_solution_ess/public/jest.config.js @@ -8,7 +8,9 @@ module.exports = { preset: '@kbn/test', rootDir: '../../../../../..', /** all nested directories have their own Jest config file */ - testMatch: ['/x-pack/solutions/security/plugins/security_solution_ess/public/**/*.test.{js,mjs,ts,tsx}'], + testMatch: [ + '/x-pack/solutions/security/plugins/security_solution_ess/public/**/*.test.{js,mjs,ts,tsx}', + ], roots: ['/x-pack/solutions/security/plugins/security_solution_ess/public'], coverageDirectory: '/target/kibana-coverage/jest/x-pack/solutions/security/plugins/security_solution_ess/public', diff --git a/x-pack/solutions/security/plugins/security_solution_serverless/jest.config.dev.js b/x-pack/solutions/security/plugins/security_solution_serverless/jest.config.dev.js index 432df5abac9b2..326469a6e7bbb 100644 --- a/x-pack/solutions/security/plugins/security_solution_serverless/jest.config.dev.js +++ b/x-pack/solutions/security/plugins/security_solution_serverless/jest.config.dev.js @@ -8,5 +8,7 @@ module.exports = { preset: '@kbn/test', rootDir: '../../../../../', - projects: ['/x-pack/solutions/security/plugins/security_solution_serverless/public/jest.config.js'], + projects: [ + '/x-pack/solutions/security/plugins/security_solution_serverless/public/jest.config.js', + ], };