<commit_before>const IS_EE = process.env.IS_EE === 'true';

const moduleNameMapper = {
  '.*\\.(css|less|styl|scss|sass)$': '<rootDir>/test/config/front/mocks/cssModule.js',
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$':
    '<rootDir>/test/config/front/mocks/image.js',
  '^ee_else_ce(/.*)$': [
    '<rootDir>/packages/core/admin/admin/src$1',
    '<rootDir>/packages/core/content-manager/admin/src$1',
    '<rootDir>/packages/core/content-type-builder/admin/src$1',
    '<rootDir>/packages/core/upload/admin/src$1',
    '<rootDir>/packages/core/email/admin/src$1',
    '<rootDir>/packages/plugins/*/admin/src$1',
  ],
};

if (IS_EE) {
  const rootDirEE = [
    '<rootDir>/packages/core/admin/ee/admin$1',
    '<rootDir>/packages/core/content-manager/ee/admin/src$1',
    '<rootDir>/packages/core/content-type-builder/ee/admin/src$1',
    '<rootDir>/packages/core/upload/ee/admin/src$1',
    '<rootDir>/packages/core/email/ee/admin/src$1',
    '<rootDir>/packages/plugins/*/ee/admin/src$1',
  ];

  Object.assign(moduleNameMapper, {
    '^ee_else_ce(/.*)$': rootDirEE,
  });
}

module.exports = {
  collectCoverageFrom: [
    'packages/core/*/admin/src/**/*.js',
    'packages/plugins/*/admin/src/**/*.js',
  ],
  globals: {
    __webpack_public_path__: 'http://localhost:4000',
    strapi: {
      backendURL: 'http://localhost:1337',
    },
    BACKEND_URL: 'http://localhost:1337',
    MODE: 'host',
    PUBLIC_PATH: '/admin',
    REMOTE_URL: '/',
    NODE_ENV: 'test',
    ENABLED_EE_FEATURES: [],
  },
  moduleDirectories: [
    'node_modules',
    '<rootDir>/packages/strapi-admin/node_modules',
    '<rootDir>/test/config/front',
  ],
  moduleNameMapper,
  rootDir: process.cwd(),
  setupFiles: ['<rootDir>/test/config/front/test-bundler.js'],
  testPathIgnorePatterns: [
    '/node_modules/',
    '<rootDir>/examples/getstarted/',
    '<rootDir>/packages/strapi-helper-plugin/dist/',
    '/OLD/',<commit_msg>Fix test env<commit_after>const IS_EE = process.env.IS_EE === 'true';

const moduleNameMapper = {
  '.*\\.(css|less|styl|scss|sass)$': '<rootDir>/test/config/front/mocks/cssModule.js',
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$':
    '<rootDir>/test/config/front/mocks/image.js',
  '^ee_else_ce(/.*)$': [
    '<rootDir>/packages/core/admin/admin/src$1',
    '<rootDir>/packages/core/content-manager/admin/src$1',
    '<rootDir>/packages/core/content-type-builder/admin/src$1',
    '<rootDir>/packages/core/upload/admin/src$1',
    '<rootDir>/packages/core/email/admin/src$1',
    '<rootDir>/packages/plugins/*/admin/src$1',
  ],
};

if (IS_EE) {
  const rootDirEE = [
    '<rootDir>/packages/core/admin/ee/admin$1',
    '<rootDir>/packages/core/content-manager/ee/admin/src$1',
    '<rootDir>/packages/core/content-type-builder/ee/admin/src$1',
    '<rootDir>/packages/core/upload/ee/admin/src$1',
    '<rootDir>/packages/core/email/ee/admin/src$1',
    '<rootDir>/packages/plugins/*/ee/admin/src$1',
  ];

  Object.assign(moduleNameMapper, {
    '^ee_else_ce(/.*)$': rootDirEE,
  });
}

module.exports = {
  collectCoverageFrom: [
    'packages/core/*/admin/src/**/*.js',
    'packages/plugins/*/admin/src/**/*.js',
  ],
  globals: {
    __webpack_public_path__: 'http://localhost:4000',
    strapi: {
      backendURL: 'http://localhost:1337',
    },
    BACKEND_URL: 'http://localhost:1337',
    ADMIN_PATH: '/admin',
    NODE_ENV: 'test',
    ENABLED_EE_FEATURES: [],
  },
  moduleDirectories: [
    'node_modules',
    '<rootDir>/packages/strapi-admin/node_modules',
    '<rootDir>/test/config/front',
  ],
  moduleNameMapper,
  rootDir: process.cwd(),
  setupFiles: ['<rootDir>/test/config/front/test-bundler.js'],
  testPathIgnorePatterns: [
    '/node_modules/',
    '<rootDir>/examples/getstarted/',
    '<rootDir>/packages/strapi-helper-plugin/dist/',
    '/OLD/',
{'fraction_non_alphanumeric': 0.21882231936230392, 'fraction_numerical': 0.014399588583183338, 'mean_word_length': 3.7788697788697787, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1960273', 'n_tokens_mistral': 1528, 'n_tokens_neox': 1526, 'n_words': 126}