123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342 |
- 'use strict';
- Object.defineProperty(exports, '__esModule', {
- value: true
- });
- exports.initialProjectOptions = exports.initialOptions = void 0;
- function _jestRegexUtil() {
- const data = require('jest-regex-util');
- _jestRegexUtil = function () {
- return data;
- };
- return data;
- }
- function _jestValidate() {
- const data = require('jest-validate');
- _jestValidate = function () {
- return data;
- };
- return data;
- }
- function _prettyFormat() {
- const data = require('pretty-format');
- _prettyFormat = function () {
- return data;
- };
- return data;
- }
- var _constants = require('./constants');
- /**
- * Copyright (c) Meta Platforms, Inc. and affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
- const NODE_MODULES_REGEXP = (0, _jestRegexUtil().replacePathSepForRegex)(
- _constants.NODE_MODULES
- );
- const initialOptions = {
- automock: false,
- bail: (0, _jestValidate().multipleValidOptions)(false, 0),
- cache: true,
- cacheDirectory: '/tmp/user/jest',
- changedFilesWithAncestor: false,
- changedSince: 'master',
- ci: false,
- clearMocks: false,
- collectCoverage: true,
- collectCoverageFrom: ['src', '!public'],
- coverageDirectory: 'coverage',
- coveragePathIgnorePatterns: [NODE_MODULES_REGEXP],
- coverageProvider: 'v8',
- coverageReporters: ['json', 'text', 'lcov', 'clover'],
- coverageThreshold: {
- global: {
- branches: 50,
- functions: 100,
- lines: 100,
- statements: 100
- }
- },
- dependencyExtractor: '<rootDir>/dependencyExtractor.js',
- detectLeaks: false,
- detectOpenHandles: false,
- displayName: (0, _jestValidate().multipleValidOptions)('test-config', {
- color: 'blue',
- name: 'test-config'
- }),
- errorOnDeprecated: false,
- expand: false,
- extensionsToTreatAsEsm: [],
- fakeTimers: {
- advanceTimers: (0, _jestValidate().multipleValidOptions)(40, true),
- doNotFake: [
- 'Date',
- 'hrtime',
- 'nextTick',
- 'performance',
- 'queueMicrotask',
- 'requestAnimationFrame',
- 'cancelAnimationFrame',
- 'requestIdleCallback',
- 'cancelIdleCallback',
- 'setImmediate',
- 'clearImmediate',
- 'setInterval',
- 'clearInterval',
- 'setTimeout',
- 'clearTimeout'
- ],
- enableGlobally: true,
- legacyFakeTimers: false,
- now: 1483228800000,
- timerLimit: 1000
- },
- filter: '<rootDir>/filter.js',
- forceCoverageMatch: ['**/*.t.js'],
- forceExit: false,
- globalSetup: 'setup.js',
- globalTeardown: 'teardown.js',
- globals: {
- __DEV__: true
- },
- haste: {
- computeSha1: true,
- defaultPlatform: 'ios',
- enableSymlinks: false,
- forceNodeFilesystemAPI: true,
- hasteImplModulePath: '<rootDir>/haste_impl.js',
- hasteMapModulePath: '',
- platforms: ['ios', 'android'],
- retainAllFiles: false,
- throwOnModuleCollision: false
- },
- id: 'string',
- injectGlobals: true,
- json: false,
- lastCommit: false,
- listTests: false,
- logHeapUsage: true,
- maxConcurrency: 5,
- maxWorkers: '50%',
- moduleDirectories: ['node_modules'],
- moduleFileExtensions: [
- 'js',
- 'mjs',
- 'cjs',
- 'json',
- 'jsx',
- 'ts',
- 'tsx',
- 'node'
- ],
- moduleNameMapper: {
- '^React$': '<rootDir>/node_modules/react'
- },
- modulePathIgnorePatterns: ['<rootDir>/build/'],
- modulePaths: ['/shared/vendor/modules'],
- noStackTrace: false,
- notify: false,
- notifyMode: 'failure-change',
- onlyChanged: false,
- onlyFailures: false,
- openHandlesTimeout: 1000,
- passWithNoTests: false,
- preset: 'react-native',
- prettierPath: '<rootDir>/node_modules/prettier',
- projects: ['project-a', 'project-b/'],
- randomize: false,
- reporters: [
- 'default',
- 'custom-reporter-1',
- [
- 'custom-reporter-2',
- {
- configValue: true
- }
- ]
- ],
- resetMocks: false,
- resetModules: false,
- resolver: '<rootDir>/resolver.js',
- restoreMocks: false,
- rootDir: '/',
- roots: ['<rootDir>'],
- runTestsByPath: false,
- runner: 'jest-runner',
- runtime: '<rootDir>',
- sandboxInjectedGlobals: [],
- setupFiles: ['<rootDir>/setup.js'],
- setupFilesAfterEnv: ['<rootDir>/testSetupFile.js'],
- showSeed: false,
- silent: true,
- skipFilter: false,
- skipNodeResolution: false,
- slowTestThreshold: 5,
- snapshotFormat: _prettyFormat().DEFAULT_OPTIONS,
- snapshotResolver: '<rootDir>/snapshotResolver.js',
- snapshotSerializers: ['my-serializer-module'],
- testEnvironment: 'jest-environment-node',
- testEnvironmentOptions: {
- url: 'http://localhost',
- userAgent: 'Agent/007'
- },
- testFailureExitCode: 1,
- testLocationInResults: false,
- testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
- testNamePattern: 'test signature',
- testPathIgnorePatterns: [NODE_MODULES_REGEXP],
- testRegex: (0, _jestValidate().multipleValidOptions)(
- '(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$',
- ['/__tests__/\\.test\\.[jt]sx?$', '/__tests__/\\.spec\\.[jt]sx?$']
- ),
- testResultsProcessor: 'processor-node-module',
- testRunner: 'circus',
- testSequencer: '@jest/test-sequencer',
- testTimeout: 5000,
- transform: {
- '\\.js$': '<rootDir>/preprocessor.js'
- },
- transformIgnorePatterns: [NODE_MODULES_REGEXP],
- unmockedModulePathPatterns: ['mock'],
- updateSnapshot: true,
- useStderr: false,
- verbose: false,
- watch: false,
- watchAll: false,
- watchPathIgnorePatterns: ['<rootDir>/e2e/'],
- watchPlugins: [
- 'path/to/yourWatchPlugin',
- [
- 'jest-watch-typeahead/filename',
- {
- key: 'k',
- prompt: 'do something with my custom prompt'
- }
- ]
- ],
- watchman: true,
- workerIdleMemoryLimit: (0, _jestValidate().multipleValidOptions)(0.2, '50%'),
- workerThreads: true
- };
- exports.initialOptions = initialOptions;
- const initialProjectOptions = {
- automock: false,
- cache: true,
- cacheDirectory: '/tmp/user/jest',
- clearMocks: false,
- collectCoverageFrom: ['src', '!public'],
- coverageDirectory: 'coverage',
- coveragePathIgnorePatterns: [NODE_MODULES_REGEXP],
- dependencyExtractor: '<rootDir>/dependencyExtractor.js',
- detectLeaks: false,
- detectOpenHandles: false,
- displayName: (0, _jestValidate().multipleValidOptions)('test-config', {
- color: 'blue',
- name: 'test-config'
- }),
- errorOnDeprecated: false,
- extensionsToTreatAsEsm: [],
- fakeTimers: {
- advanceTimers: (0, _jestValidate().multipleValidOptions)(40, true),
- doNotFake: [
- 'Date',
- 'hrtime',
- 'nextTick',
- 'performance',
- 'queueMicrotask',
- 'requestAnimationFrame',
- 'cancelAnimationFrame',
- 'requestIdleCallback',
- 'cancelIdleCallback',
- 'setImmediate',
- 'clearImmediate',
- 'setInterval',
- 'clearInterval',
- 'setTimeout',
- 'clearTimeout'
- ],
- enableGlobally: true,
- legacyFakeTimers: false,
- now: 1483228800000,
- timerLimit: 1000
- },
- filter: '<rootDir>/filter.js',
- forceCoverageMatch: ['**/*.t.js'],
- globalSetup: 'setup.js',
- globalTeardown: 'teardown.js',
- globals: {
- __DEV__: true
- },
- haste: {
- computeSha1: true,
- defaultPlatform: 'ios',
- enableSymlinks: false,
- forceNodeFilesystemAPI: true,
- hasteImplModulePath: '<rootDir>/haste_impl.js',
- hasteMapModulePath: '',
- platforms: ['ios', 'android'],
- retainAllFiles: false,
- throwOnModuleCollision: false
- },
- id: 'string',
- injectGlobals: true,
- moduleDirectories: ['node_modules'],
- moduleFileExtensions: [
- 'js',
- 'mjs',
- 'cjs',
- 'json',
- 'jsx',
- 'ts',
- 'tsx',
- 'node'
- ],
- moduleNameMapper: {
- '^React$': '<rootDir>/node_modules/react'
- },
- modulePathIgnorePatterns: ['<rootDir>/build/'],
- modulePaths: ['/shared/vendor/modules'],
- openHandlesTimeout: 1000,
- preset: 'react-native',
- prettierPath: '<rootDir>/node_modules/prettier',
- resetMocks: false,
- resetModules: false,
- resolver: '<rootDir>/resolver.js',
- restoreMocks: false,
- rootDir: '/',
- roots: ['<rootDir>'],
- runner: 'jest-runner',
- runtime: '<rootDir>',
- sandboxInjectedGlobals: [],
- setupFiles: ['<rootDir>/setup.js'],
- setupFilesAfterEnv: ['<rootDir>/testSetupFile.js'],
- skipFilter: false,
- skipNodeResolution: false,
- slowTestThreshold: 5,
- snapshotFormat: _prettyFormat().DEFAULT_OPTIONS,
- snapshotResolver: '<rootDir>/snapshotResolver.js',
- snapshotSerializers: ['my-serializer-module'],
- testEnvironment: 'jest-environment-node',
- testEnvironmentOptions: {
- url: 'http://localhost',
- userAgent: 'Agent/007'
- },
- testLocationInResults: false,
- testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
- testPathIgnorePatterns: [NODE_MODULES_REGEXP],
- testRegex: (0, _jestValidate().multipleValidOptions)(
- '(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$',
- ['/__tests__/\\.test\\.[jt]sx?$', '/__tests__/\\.spec\\.[jt]sx?$']
- ),
- testRunner: 'circus',
- transform: {
- '\\.js$': '<rootDir>/preprocessor.js'
- },
- transformIgnorePatterns: [NODE_MODULES_REGEXP],
- unmockedModulePathPatterns: ['mock'],
- watchPathIgnorePatterns: ['<rootDir>/e2e/'],
- workerIdleMemoryLimit: (0, _jestValidate().multipleValidOptions)(0.2, '50%')
- };
- exports.initialProjectOptions = initialProjectOptions;
|