diff --git a/packages/jest-config/src/Defaults.ts b/packages/jest-config/src/Defaults.ts index b25ff9c149c0..5adcd465c321 100644 --- a/packages/jest-config/src/Defaults.ts +++ b/packages/jest-config/src/Defaults.ts @@ -28,8 +28,12 @@ const defaultOptions: Config.DefaultOptions = { coverageThreshold: null, cwd: process.cwd(), dependencyExtractor: null, + detectLeaks: false, + detectOpenHandles: false, + displayName: null, errorOnDeprecated: false, expand: false, + extraGlobals: null, filter: null, forceCoverageMatch: [], globalSetup: null, @@ -44,6 +48,7 @@ const defaultOptions: Config.DefaultOptions = { moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'], moduleNameMapper: {}, modulePathIgnorePatterns: [], + name: null, noStackTrace: false, notify: false, notifyMode: 'failure-change', diff --git a/packages/jest-types/src/Config.ts b/packages/jest-types/src/Config.ts index bdd9c64efc39..ded5ef48ba64 100644 --- a/packages/jest-types/src/Config.ts +++ b/packages/jest-types/src/Config.ts @@ -24,84 +24,80 @@ export type ReporterConfig = [string, Object]; export type ConfigGlobals = Object; export type DefaultOptions = { - automock: boolean; + automock: false; bail: number; - browser: boolean; - cache: boolean; + browser: false; + cache: true; cacheDirectory: Path; - changedFilesWithAncestor: boolean; - clearMocks: boolean; - collectCoverage: boolean; - collectCoverageFrom: Array | null | undefined; - coverageDirectory: string | null | undefined; + changedFilesWithAncestor: false; + clearMocks: false; + collectCoverage: false; + collectCoverageFrom: null; + coverageDirectory: null; coveragePathIgnorePatterns: Array; coverageReporters: Array; - coverageThreshold: - | { - global: { - [key: string]: number; - }; - } - | null - | undefined; + coverageThreshold: null; cwd: Path; - dependencyExtractor: string | null | undefined; - errorOnDeprecated: boolean; - expand: boolean; - filter: Path | null | undefined; + dependencyExtractor: undefined; + detectLeaks: false; + detectOpenHandles: false; + displayName: null; + errorOnDeprecated: false; + expand: false; + extraGlobals: null; + filter: null; forceCoverageMatch: Array; globals: ConfigGlobals; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; + globalSetup: null; + globalTeardown: null; haste: HasteConfig; maxConcurrency: number; moduleDirectories: Array; moduleFileExtensions: Array; - moduleNameMapper: { - [key: string]: string; - }; + moduleLoader: null; + moduleNameMapper: {[key: string]: Path}; modulePathIgnorePatterns: Array; - noStackTrace: boolean; - notify: boolean; - notifyMode: string; - preset: string | null | undefined; - prettierPath: string | null | undefined; - projects: Array | null | undefined; - resetMocks: boolean; - resetModules: boolean; - resolver: Path | null | undefined; - restoreMocks: boolean; - rootDir: Path | null | undefined; - roots: Array | null | undefined; - runner: string; - runTestsByPath: boolean; + modulePaths: null; + name: null; + noStackTrace: false; + notify: false; + notifyMode: NotifyMode; + preset: null; + prettierPath: 'prettier'; + projects: null; + resetMocks: false; + resetModules: false; + resolver: null; + restoreMocks: false; + rootDir: null; + roots: Array; + runTestsByPath: false; + runner: 'jest-runner'; setupFiles: Array; setupFilesAfterEnv: Array; - skipFilter: boolean; + skipFilter: false; + skipNodeResolution: false; + snapshotResolver: null; snapshotSerializers: Array; testEnvironment: string; testEnvironmentOptions: Object; testFailureExitCode: string | number; - testLocationInResults: boolean; + testLocationInResults: false; testMatch: Array; testPathIgnorePatterns: Array; testRegex: Array; - testResultsProcessor: string | null | undefined; - testRunner: string | null | undefined; + testResultsProcessor: null; + testRunner: 'jasmine2'; testURL: string; - timers: 'real' | 'fake'; - transform: - | { - [key: string]: string; - } - | null - | undefined; + timers: 'real'; + transform: null; transformIgnorePatterns: Array; + unmockedModulePathPatterns: null; + useStderr: false; + verbose: null; + watch: false; watchPathIgnorePatterns: Array; - useStderr: boolean; - verbose: boolean | null | undefined; - watch: boolean; - watchman: boolean; + watchman: true; }; export type InitialOptions = {