diff --git a/CHANGELOG.md b/CHANGELOG.md index afcaa6cb3e51..589b1885aae7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Features +- `[jest-circus, jest-cli]` [**BREAKING**] Only include detailed errors when `--detailed-errors-in-results` is provided ([#15016](https://github.com/jestjs/jest/pull/15016)) - `[jest-circus, jest-cli, jest-config]` Add `waitNextEventLoopTurnForUnhandledRejectionEvents` flag to minimise performance impact of correct detection of unhandled promise rejections introduced in [#14315](https://github.com/jestjs/jest/pull/14315) ([#14681](https://github.com/jestjs/jest/pull/14681)) - `[jest-circus]` Add a `waitBeforeRetry` option to `jest.retryTimes` ([#14738](https://github.com/jestjs/jest/pull/14738)) - `[jest-circus]` Add a `retryImmediately` option to `jest.retryTimes` ([#14696](https://github.com/jestjs/jest/pull/14696)) diff --git a/docs/CLI.md b/docs/CLI.md index de66a17e6034..27afb0df9e59 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -176,6 +176,16 @@ Indicates which provider should be used to instrument code for coverage. Allowed Print debugging info about your Jest config. +### `--detailedErrorsInResults` + +Populates `errorsDetailed` field in the test results. Useful to some tooling like WebStorm but can result in circular reference errors under some test failure conditions. + +:::note + +This flag should generally be provided by tools like WebStorm automatically; you don't need to specify it yourself. + +::: + ### `--detectOpenHandles` Attempt to collect and print open handles preventing Jest from exiting cleanly. Use this in cases where you need to use `--forceExit` in order for Jest to exit to potentially track down the reason. This implies `--runInBand`, making tests run serially. Implemented using [`async_hooks`](https://nodejs.org/api/async_hooks.html). This option has a significant performance penalty and should only be used for debugging. diff --git a/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap b/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap index 3ce39baaff64..857b238e3e95 100644 --- a/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap +++ b/e2e/__tests__/__snapshots__/circusDeclarationErrors.test.ts.snap @@ -16,7 +16,7 @@ exports[`defining tests and hooks asynchronously throws 1`] = ` 14 | }); 15 | }); - at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:148:38) + at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:153:38) at test (__tests__/asyncDefinition.test.js:12:5) ● Test suite failed to run @@ -31,7 +31,7 @@ exports[`defining tests and hooks asynchronously throws 1`] = ` 15 | }); 16 | - at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:114:38) + at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:119:38) at afterAll (__tests__/asyncDefinition.test.js:13:5) ● Test suite failed to run @@ -46,7 +46,7 @@ exports[`defining tests and hooks asynchronously throws 1`] = ` 20 | }); 21 | - at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:148:38) + at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:153:38) at test (__tests__/asyncDefinition.test.js:18:3) ● Test suite failed to run @@ -60,6 +60,6 @@ exports[`defining tests and hooks asynchronously throws 1`] = ` 20 | }); 21 | - at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:114:38) + at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:119:38) at afterAll (__tests__/asyncDefinition.test.js:19:3)" `; diff --git a/e2e/__tests__/__snapshots__/failures.test.ts.snap b/e2e/__tests__/__snapshots__/failures.test.ts.snap index 6a4857e80dcb..9f31fac0f2a5 100644 --- a/e2e/__tests__/__snapshots__/failures.test.ts.snap +++ b/e2e/__tests__/__snapshots__/failures.test.ts.snap @@ -1,5 +1,60 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`cause support is fine when there are no detailed errors in the results 1`] = ` +"FAIL __tests__/errorWithCause.test.js + ✕ error with cause in test + describe block + ✕ error with cause in describe/it + ✕ error with string cause in describe/it + + ● error with cause in test + + error during f + + 10 | + 11 | function buildErrorWithCause(message: string, opts: {cause: unknown}): Error { + > 12 | const error = new Error(message, opts); + | ^ + 13 | if (opts.cause !== error.cause) { + 14 | // Error with cause not supported in legacy versions of node, we just polyfill it + 15 | Object.assign(error, opts); + + at buildErrorWithCause (__tests__/errorWithCause.test.js:12:17) + at buildErrorWithCause (__tests__/errorWithCause.test.js:27:11) + at Object.f (__tests__/errorWithCause.test.js:32:3) + + ● describe block › error with cause in describe/it + + error during f + + 10 | + 11 | function buildErrorWithCause(message: string, opts: {cause: unknown}): Error { + > 12 | const error = new Error(message, opts); + | ^ + 13 | if (opts.cause !== error.cause) { + 14 | // Error with cause not supported in legacy versions of node, we just polyfill it + 15 | Object.assign(error, opts); + + at buildErrorWithCause (__tests__/errorWithCause.test.js:12:17) + at buildErrorWithCause (__tests__/errorWithCause.test.js:27:11) + at Object.f (__tests__/errorWithCause.test.js:37:5) + + ● describe block › error with string cause in describe/it + + with string cause + + 10 | + 11 | function buildErrorWithCause(message: string, opts: {cause: unknown}): Error { + > 12 | const error = new Error(message, opts); + | ^ + 13 | if (opts.cause !== error.cause) { + 14 | // Error with cause not supported in legacy versions of node, we just polyfill it + 15 | Object.assign(error, opts); + + at buildErrorWithCause (__tests__/errorWithCause.test.js:12:17) + at Object.buildErrorWithCause (__tests__/errorWithCause.test.js:41:11)" +`; + exports[`not throwing Error objects 1`] = ` "FAIL __tests__/throwNumber.test.js ● Test suite failed to run diff --git a/e2e/__tests__/__snapshots__/showConfig.test.ts.snap b/e2e/__tests__/__snapshots__/showConfig.test.ts.snap index b28bc91cfb4a..05f3cc9940c5 100644 --- a/e2e/__tests__/__snapshots__/showConfig.test.ts.snap +++ b/e2e/__tests__/__snapshots__/showConfig.test.ts.snap @@ -20,6 +20,7 @@ exports[`--showConfig outputs config info and exits 1`] = ` "clover" ], "cwd": "<>", + "detailedErrorsInResults": false, "detectLeaks": false, "detectOpenHandles": false, "errorOnDeprecated": false, diff --git a/e2e/__tests__/failureDetailsProperty.test.ts b/e2e/__tests__/failureDetailsProperty.test.ts index 3f8d3a2e1b66..e3065e36b9bb 100644 --- a/e2e/__tests__/failureDetailsProperty.test.ts +++ b/e2e/__tests__/failureDetailsProperty.test.ts @@ -16,6 +16,7 @@ const removeStackTraces = (stdout: string) => test('that the failureDetails property is set', () => { const {stdout, stderr} = runJest('failureDetails-property', [ + '--detailed-errors-in-results', 'tests.test.js', ]); diff --git a/e2e/__tests__/failures.test.ts b/e2e/__tests__/failures.test.ts index 3a9dcfcd840f..5144a9f34fd7 100644 --- a/e2e/__tests__/failures.test.ts +++ b/e2e/__tests__/failures.test.ts @@ -89,15 +89,28 @@ test('works with snapshot failures with hint', () => { expect(result.slice(0, result.indexOf('Snapshot Summary'))).toMatchSnapshot(); }); -test('works with error with cause', () => { +test('cause support is fine when there are no detailed errors in the results', () => { const {stderr} = runJest(dir, ['errorWithCause.test.js']); const summary = normalizeDots(cleanStderr(stderr)); expect(summary).toMatchSnapshot(); }); +test('works with error with cause', () => { + const {stderr} = runJest(dir, [ + '--detailed-errors-in-results', + 'errorWithCause.test.js', + ]); + const summary = normalizeDots(cleanStderr(stderr)); + + expect(summary).toMatchSnapshot(); +}); + test('works with error with cause thrown outside tests', () => { - const {stderr} = runJest(dir, ['errorWithCauseInDescribe.test.js']); + const {stderr} = runJest(dir, [ + '--detailed-errors-in-results', + 'errorWithCauseInDescribe.test.js', + ]); const summary = normalizeDots(cleanStderr(stderr)); const sanitizedSummary = summary diff --git a/packages/create-jest/src/__tests__/__snapshots__/init.test.ts.snap b/packages/create-jest/src/__tests__/__snapshots__/init.test.ts.snap index 20e00e7dab4b..a720bb985050 100644 --- a/packages/create-jest/src/__tests__/__snapshots__/init.test.ts.snap +++ b/packages/create-jest/src/__tests__/__snapshots__/init.test.ts.snap @@ -176,6 +176,9 @@ const config: Config = { // A path to a custom dependency extractor // dependencyExtractor: undefined, + // Add detailed error information to the test results for tooling + // detailedErrorsInResults: false, + // Make calling deprecated APIs throw helpful error messages // errorOnDeprecated: false, @@ -380,6 +383,9 @@ const config = { // A path to a custom dependency extractor // dependencyExtractor: undefined, + // Add detailed error information to the test results for tooling + // detailedErrorsInResults: false, + // Make calling deprecated APIs throw helpful error messages // errorOnDeprecated: false, @@ -584,6 +590,9 @@ const config = { // A path to a custom dependency extractor // dependencyExtractor: undefined, + // Add detailed error information to the test results for tooling + // detailedErrorsInResults: false, + // Make calling deprecated APIs throw helpful error messages // errorOnDeprecated: false, diff --git a/packages/jest-circus/src/eventHandler.ts b/packages/jest-circus/src/eventHandler.ts index 63c2d5ecd924..f2f8f24e2606 100644 --- a/packages/jest-circus/src/eventHandler.ts +++ b/packages/jest-circus/src/eventHandler.ts @@ -26,6 +26,10 @@ const eventHandler: Circus.EventHandler = (event, state) => { state.includeTestLocationInResult = true; break; } + case 'include_detailed_errors_in_result': { + state.includeDetailedErrorsInResult = true; + break; + } case 'hook_start': { event.hook.seenDone = false; break; diff --git a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts index 7eb6268ca0c8..b0abacb7b304 100644 --- a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts +++ b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts @@ -110,6 +110,10 @@ export const initialize = async ({ await dispatch({name: 'include_test_location_in_result'}); } + if (config.detailedErrorsInResults) { + await dispatch({name: 'include_detailed_errors_in_result'}); + } + // Jest tests snapshotSerializers in order preceding built-in serializers. // Therefore, add in reverse because the last added is the first tested. for (const path of [...config.snapshotSerializers].reverse()) diff --git a/packages/jest-circus/src/state.ts b/packages/jest-circus/src/state.ts index deda31560871..c6476e8b8f45 100644 --- a/packages/jest-circus/src/state.ts +++ b/packages/jest-circus/src/state.ts @@ -26,6 +26,7 @@ const createState = (): Circus.State => { expand: undefined, hasFocusedTests: false, hasStarted: false, + includeDetailedErrorsInResult: false, includeTestLocationInResult: false, maxConcurrency: 5, parentProcess: null, diff --git a/packages/jest-circus/src/utils.ts b/packages/jest-circus/src/utils.ts index 84aab232bde1..acb69af77eab 100644 --- a/packages/jest-circus/src/utils.ts +++ b/packages/jest-circus/src/utils.ts @@ -343,7 +343,8 @@ const getTestNamesPath = (test: Circus.TestEntry): Circus.TestNamesPath => { export const makeSingleTestResult = ( test: Circus.TestEntry, ): Circus.TestResult => { - const {includeTestLocationInResult} = getState(); + const {includeTestLocationInResult, includeDetailedErrorsInResult} = + getState(); const {status} = test; invariant(status, 'Status should be present after tests are run.'); @@ -376,7 +377,7 @@ export const makeSingleTestResult = ( return { duration: test.duration, errors: errorsDetailed.map(getErrorStack), - errorsDetailed, + errorsDetailed: includeDetailedErrorsInResult ? errorsDetailed : [], failing: test.failing, invocations: test.invocations, location, diff --git a/packages/jest-cli/src/args.ts b/packages/jest-cli/src/args.ts index 5e84991fd47d..34ea261f410e 100644 --- a/packages/jest-cli/src/args.ts +++ b/packages/jest-cli/src/args.ts @@ -236,6 +236,11 @@ export const options: {[key: string]: Options} = { description: 'Print debugging info about your jest config.', type: 'boolean', }, + detailedErrorsInResults: { + description: + 'Add detailed error information to the test results for tooling', + type: 'boolean', + }, detectLeaks: { description: '**EXPERIMENTAL**: Detect memory leaks in tests. After executing a ' + diff --git a/packages/jest-config/src/Defaults.ts b/packages/jest-config/src/Defaults.ts index 7ec03aa39273..e6c1db646d09 100644 --- a/packages/jest-config/src/Defaults.ts +++ b/packages/jest-config/src/Defaults.ts @@ -26,6 +26,7 @@ const defaultOptions: Config.DefaultOptions = { coveragePathIgnorePatterns: [NODE_MODULES_REGEXP], coverageProvider: 'babel', coverageReporters: ['json', 'text', 'lcov', 'clover'], + detailedErrorsInResults: false, detectLeaks: false, detectOpenHandles: false, errorOnDeprecated: false, diff --git a/packages/jest-config/src/Descriptions.ts b/packages/jest-config/src/Descriptions.ts index 19e4793f678c..63c3b81d2463 100644 --- a/packages/jest-config/src/Descriptions.ts +++ b/packages/jest-config/src/Descriptions.ts @@ -29,6 +29,8 @@ const descriptions: {[key in keyof Config.InitialOptions]: string} = { coverageThreshold: 'An object that configures minimum threshold enforcement for coverage results', dependencyExtractor: 'A path to a custom dependency extractor', + detailedErrorsInResults: + 'Add detailed error information to the test results for tooling', errorOnDeprecated: 'Make calling deprecated APIs throw helpful error messages', fakeTimers: 'The default configuration for fake timers', diff --git a/packages/jest-config/src/ValidConfig.ts b/packages/jest-config/src/ValidConfig.ts index 73a89e7333bf..c176af18010f 100644 --- a/packages/jest-config/src/ValidConfig.ts +++ b/packages/jest-config/src/ValidConfig.ts @@ -37,6 +37,7 @@ export const initialOptions: Config.InitialOptions = { }, }, dependencyExtractor: '/dependencyExtractor.js', + detailedErrorsInResults: false, detectLeaks: false, detectOpenHandles: false, displayName: multipleValidOptions('test-config', { @@ -210,6 +211,7 @@ export const initialProjectOptions: Config.InitialProjectOptions = { coveragePathIgnorePatterns: [NODE_MODULES_REGEXP], coverageReporters: ['json', 'text', 'lcov', 'clover'], dependencyExtractor: '/dependencyExtractor.js', + detailedErrorsInResults: false, detectLeaks: false, detectOpenHandles: false, displayName: multipleValidOptions('test-config', { diff --git a/packages/jest-config/src/index.ts b/packages/jest-config/src/index.ts index 8523938629ca..bb580751100d 100644 --- a/packages/jest-config/src/index.ts +++ b/packages/jest-config/src/index.ts @@ -158,6 +158,7 @@ const groupOptions = ( coverageReporters: options.coverageReporters, cwd: options.cwd, dependencyExtractor: options.dependencyExtractor, + detailedErrorsInResults: options.detailedErrorsInResults, detectLeaks: options.detectLeaks, detectOpenHandles: options.detectOpenHandles, displayName: options.displayName, diff --git a/packages/jest-config/src/normalize.ts b/packages/jest-config/src/normalize.ts index b317a0e86691..86d7b3d507d4 100644 --- a/packages/jest-config/src/normalize.ts +++ b/packages/jest-config/src/normalize.ts @@ -898,6 +898,7 @@ export default async function normalize( case 'coverageProvider': case 'coverageReporters': case 'coverageThreshold': + case 'detailedErrorsInResults': case 'detectLeaks': case 'detectOpenHandles': case 'errorOnDeprecated': diff --git a/packages/jest-core/src/lib/__tests__/__snapshots__/logDebugMessages.test.ts.snap b/packages/jest-core/src/lib/__tests__/__snapshots__/logDebugMessages.test.ts.snap index ebe9a4456480..34e5aed35a7a 100644 --- a/packages/jest-core/src/lib/__tests__/__snapshots__/logDebugMessages.test.ts.snap +++ b/packages/jest-core/src/lib/__tests__/__snapshots__/logDebugMessages.test.ts.snap @@ -15,6 +15,7 @@ exports[`prints the config object 1`] = ` "coveragePathIgnorePatterns": [], "coverageReporters": [], "cwd": "/test_root_dir/", + "detailedErrorsInResults": false, "detectLeaks": false, "detectOpenHandles": false, "errorOnDeprecated": false, diff --git a/packages/jest-jasmine2/src/reporter.ts b/packages/jest-jasmine2/src/reporter.ts index 4182b370cc3d..93f6fd912a75 100644 --- a/packages/jest-jasmine2/src/reporter.ts +++ b/packages/jest-jasmine2/src/reporter.ts @@ -160,7 +160,10 @@ export default class Jasmine2Reporter implements Reporter { ? this._addMissingMessageToStack(failed.stack, failed.message) : failed.message || ''; results.failureMessages.push(message); - results.failureDetails.push(failed); + + if (this._config.detailedErrorsInResults) { + results.failureDetails.push(failed); + } } return results; diff --git a/packages/jest-schemas/src/raw-types.ts b/packages/jest-schemas/src/raw-types.ts index f340582fc106..400068c98e7b 100644 --- a/packages/jest-schemas/src/raw-types.ts +++ b/packages/jest-schemas/src/raw-types.ts @@ -242,6 +242,7 @@ export const RawInitialOptions = Type.Partial( coverageProvider: RawCoverageProvider, coverageReporters: RawCoverageReporters, coverageThreshold: RawCoverageThreshold, + detailedErrorsInResults: Type.Boolean(), dependencyExtractor: Type.String(), detectLeaks: Type.Boolean(), detectOpenHandles: Type.Boolean(), diff --git a/packages/jest-transform/src/__tests__/__snapshots__/ScriptTransformer.test.ts.snap b/packages/jest-transform/src/__tests__/__snapshots__/ScriptTransformer.test.ts.snap index edf5da4fc49a..fff87cca493e 100644 --- a/packages/jest-transform/src/__tests__/__snapshots__/ScriptTransformer.test.ts.snap +++ b/packages/jest-transform/src/__tests__/__snapshots__/ScriptTransformer.test.ts.snap @@ -34,6 +34,7 @@ exports[`ScriptTransformer in async mode, passes expected transform options to g "coveragePathIgnorePatterns": Array [], "coverageReporters": Array [], "cwd": "/test_root_dir/", + "detailedErrorsInResults": false, "detectLeaks": false, "detectOpenHandles": false, "displayName": undefined, @@ -112,7 +113,7 @@ exports[`ScriptTransformer in async mode, passes expected transform options to g "waitNextEventLoopTurnForUnhandledRejectionEvents": false, "watchPathIgnorePatterns": Array [], }, - "configString": "{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_preprocessor",{"configKey":"configValue"}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]}", + "configString": "{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detailedErrorsInResults":false,"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_preprocessor",{"configKey":"configValue"}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]}", "coverageProvider": "babel", "instrument": true, "supportsDynamicImport": false, @@ -138,7 +139,7 @@ exports[`ScriptTransformer in async mode, uses the supplied async preprocessor 1 "const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"collectCoverage":false,"collectCoverageFrom":[],"coverageProvider":"babel","supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"instrument":false,"cacheFS":{},"config":{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_async_preprocessor",{}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]},"configString":"{\\"automock\\":false,\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"clearMocks\\":false,\\"collectCoverageFrom\\":[\\"src\\",\\"!public\\"],\\"coverageDirectory\\":\\"coverage\\",\\"coveragePathIgnorePatterns\\":[],\\"coverageReporters\\":[],\\"cwd\\":\\"/test_root_dir/\\",\\"detectLeaks\\":false,\\"detectOpenHandles\\":false,\\"errorOnDeprecated\\":false,\\"extensionsToTreatAsEsm\\":[],\\"fakeTimers\\":{\\"enableGlobally\\":false},\\"forceCoverageMatch\\":[],\\"globals\\":{},\\"haste\\":{},\\"id\\":\\"test\\",\\"injectGlobals\\":true,\\"moduleDirectories\\":[],\\"moduleFileExtensions\\":[\\"js\\"],\\"moduleNameMapper\\":[],\\"modulePathIgnorePatterns\\":[],\\"modulePaths\\":[],\\"openHandlesTimeout\\":1000,\\"prettierPath\\":\\"prettier\\",\\"reporters\\":[\\"default\\",\\"custom-reporter-1\\",[\\"custom-reporter-2\\",{\\"configValue\\":true}]],\\"resetMocks\\":false,\\"resetModules\\":false,\\"restoreMocks\\":false,\\"rootDir\\":\\"/\\",\\"roots\\":[],\\"runner\\":\\"jest-runner\\",\\"runtime\\":\\"/test_module_loader_path\\",\\"sandboxInjectedGlobals\\":[],\\"setupFiles\\":[],\\"setupFilesAfterEnv\\":[],\\"skipFilter\\":false,\\"skipNodeResolution\\":false,\\"slowTestThreshold\\":5,\\"snapshotFormat\\":{},\\"snapshotSerializers\\":[],\\"testEnvironment\\":\\"node\\",\\"testEnvironmentOptions\\":{},\\"testLocationInResults\\":false,\\"testMatch\\":[],\\"testPathIgnorePatterns\\":[],\\"testRegex\\":[\\"\\\\\\\\.test\\\\\\\\.js$\\"],\\"testRunner\\":\\"jest-circus/runner\\",\\"testTimeout\\":5000,\\"transform\\":[[\\"\\\\\\\\.js$\\",\\"test_async_preprocessor\\",{}]],\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"waitNextEventLoopTurnForUnhandledRejectionEvents\\":false,\\"watchPathIgnorePatterns\\":[]}","transformerConfig":{}}', + config: '{"collectCoverage":false,"collectCoverageFrom":[],"coverageProvider":"babel","supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"instrument":false,"cacheFS":{},"config":{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detailedErrorsInResults":false,"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_async_preprocessor",{}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]},"configString":"{\\"automock\\":false,\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"clearMocks\\":false,\\"collectCoverageFrom\\":[\\"src\\",\\"!public\\"],\\"coverageDirectory\\":\\"coverage\\",\\"coveragePathIgnorePatterns\\":[],\\"coverageReporters\\":[],\\"cwd\\":\\"/test_root_dir/\\",\\"detailedErrorsInResults\\":false,\\"detectLeaks\\":false,\\"detectOpenHandles\\":false,\\"errorOnDeprecated\\":false,\\"extensionsToTreatAsEsm\\":[],\\"fakeTimers\\":{\\"enableGlobally\\":false},\\"forceCoverageMatch\\":[],\\"globals\\":{},\\"haste\\":{},\\"id\\":\\"test\\",\\"injectGlobals\\":true,\\"moduleDirectories\\":[],\\"moduleFileExtensions\\":[\\"js\\"],\\"moduleNameMapper\\":[],\\"modulePathIgnorePatterns\\":[],\\"modulePaths\\":[],\\"openHandlesTimeout\\":1000,\\"prettierPath\\":\\"prettier\\",\\"reporters\\":[\\"default\\",\\"custom-reporter-1\\",[\\"custom-reporter-2\\",{\\"configValue\\":true}]],\\"resetMocks\\":false,\\"resetModules\\":false,\\"restoreMocks\\":false,\\"rootDir\\":\\"/\\",\\"roots\\":[],\\"runner\\":\\"jest-runner\\",\\"runtime\\":\\"/test_module_loader_path\\",\\"sandboxInjectedGlobals\\":[],\\"setupFiles\\":[],\\"setupFilesAfterEnv\\":[],\\"skipFilter\\":false,\\"skipNodeResolution\\":false,\\"slowTestThreshold\\":5,\\"snapshotFormat\\":{},\\"snapshotSerializers\\":[],\\"testEnvironment\\":\\"node\\",\\"testEnvironmentOptions\\":{},\\"testLocationInResults\\":false,\\"testMatch\\":[],\\"testPathIgnorePatterns\\":[],\\"testRegex\\":[\\"\\\\\\\\.test\\\\\\\\.js$\\"],\\"testRunner\\":\\"jest-circus/runner\\",\\"testTimeout\\":5000,\\"transform\\":[[\\"\\\\\\\\.js$\\",\\"test_async_preprocessor\\",{}]],\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"waitNextEventLoopTurnForUnhandledRejectionEvents\\":false,\\"watchPathIgnorePatterns\\":[]}","transformerConfig":{}}', };" `; @@ -148,7 +149,7 @@ exports[`ScriptTransformer in async mode, uses the supplied preprocessor 1`] = ` "const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"collectCoverage":false,"collectCoverageFrom":[],"coverageProvider":"babel","supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"instrument":false,"cacheFS":{},"config":{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_preprocessor",{}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]},"configString":"{\\"automock\\":false,\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"clearMocks\\":false,\\"collectCoverageFrom\\":[\\"src\\",\\"!public\\"],\\"coverageDirectory\\":\\"coverage\\",\\"coveragePathIgnorePatterns\\":[],\\"coverageReporters\\":[],\\"cwd\\":\\"/test_root_dir/\\",\\"detectLeaks\\":false,\\"detectOpenHandles\\":false,\\"errorOnDeprecated\\":false,\\"extensionsToTreatAsEsm\\":[],\\"fakeTimers\\":{\\"enableGlobally\\":false},\\"forceCoverageMatch\\":[],\\"globals\\":{},\\"haste\\":{},\\"id\\":\\"test\\",\\"injectGlobals\\":true,\\"moduleDirectories\\":[],\\"moduleFileExtensions\\":[\\"js\\"],\\"moduleNameMapper\\":[],\\"modulePathIgnorePatterns\\":[],\\"modulePaths\\":[],\\"openHandlesTimeout\\":1000,\\"prettierPath\\":\\"prettier\\",\\"reporters\\":[\\"default\\",\\"custom-reporter-1\\",[\\"custom-reporter-2\\",{\\"configValue\\":true}]],\\"resetMocks\\":false,\\"resetModules\\":false,\\"restoreMocks\\":false,\\"rootDir\\":\\"/\\",\\"roots\\":[],\\"runner\\":\\"jest-runner\\",\\"runtime\\":\\"/test_module_loader_path\\",\\"sandboxInjectedGlobals\\":[],\\"setupFiles\\":[],\\"setupFilesAfterEnv\\":[],\\"skipFilter\\":false,\\"skipNodeResolution\\":false,\\"slowTestThreshold\\":5,\\"snapshotFormat\\":{},\\"snapshotSerializers\\":[],\\"testEnvironment\\":\\"node\\",\\"testEnvironmentOptions\\":{},\\"testLocationInResults\\":false,\\"testMatch\\":[],\\"testPathIgnorePatterns\\":[],\\"testRegex\\":[\\"\\\\\\\\.test\\\\\\\\.js$\\"],\\"testRunner\\":\\"jest-circus/runner\\",\\"testTimeout\\":5000,\\"transform\\":[[\\"\\\\\\\\.js$\\",\\"test_preprocessor\\",{}]],\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"waitNextEventLoopTurnForUnhandledRejectionEvents\\":false,\\"watchPathIgnorePatterns\\":[]}","transformerConfig":{}}', + config: '{"collectCoverage":false,"collectCoverageFrom":[],"coverageProvider":"babel","supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"instrument":false,"cacheFS":{},"config":{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detailedErrorsInResults":false,"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_preprocessor",{}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]},"configString":"{\\"automock\\":false,\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"clearMocks\\":false,\\"collectCoverageFrom\\":[\\"src\\",\\"!public\\"],\\"coverageDirectory\\":\\"coverage\\",\\"coveragePathIgnorePatterns\\":[],\\"coverageReporters\\":[],\\"cwd\\":\\"/test_root_dir/\\",\\"detailedErrorsInResults\\":false,\\"detectLeaks\\":false,\\"detectOpenHandles\\":false,\\"errorOnDeprecated\\":false,\\"extensionsToTreatAsEsm\\":[],\\"fakeTimers\\":{\\"enableGlobally\\":false},\\"forceCoverageMatch\\":[],\\"globals\\":{},\\"haste\\":{},\\"id\\":\\"test\\",\\"injectGlobals\\":true,\\"moduleDirectories\\":[],\\"moduleFileExtensions\\":[\\"js\\"],\\"moduleNameMapper\\":[],\\"modulePathIgnorePatterns\\":[],\\"modulePaths\\":[],\\"openHandlesTimeout\\":1000,\\"prettierPath\\":\\"prettier\\",\\"reporters\\":[\\"default\\",\\"custom-reporter-1\\",[\\"custom-reporter-2\\",{\\"configValue\\":true}]],\\"resetMocks\\":false,\\"resetModules\\":false,\\"restoreMocks\\":false,\\"rootDir\\":\\"/\\",\\"roots\\":[],\\"runner\\":\\"jest-runner\\",\\"runtime\\":\\"/test_module_loader_path\\",\\"sandboxInjectedGlobals\\":[],\\"setupFiles\\":[],\\"setupFilesAfterEnv\\":[],\\"skipFilter\\":false,\\"skipNodeResolution\\":false,\\"slowTestThreshold\\":5,\\"snapshotFormat\\":{},\\"snapshotSerializers\\":[],\\"testEnvironment\\":\\"node\\",\\"testEnvironmentOptions\\":{},\\"testLocationInResults\\":false,\\"testMatch\\":[],\\"testPathIgnorePatterns\\":[],\\"testRegex\\":[\\"\\\\\\\\.test\\\\\\\\.js$\\"],\\"testRunner\\":\\"jest-circus/runner\\",\\"testTimeout\\":5000,\\"transform\\":[[\\"\\\\\\\\.js$\\",\\"test_preprocessor\\",{}]],\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"waitNextEventLoopTurnForUnhandledRejectionEvents\\":false,\\"watchPathIgnorePatterns\\":[]}","transformerConfig":{}}', };" `; @@ -185,6 +186,7 @@ exports[`ScriptTransformer passes expected transform options to getCacheKey 1`] "coveragePathIgnorePatterns": Array [], "coverageReporters": Array [], "cwd": "/test_root_dir/", + "detailedErrorsInResults": false, "detectLeaks": false, "detectOpenHandles": false, "displayName": undefined, @@ -263,7 +265,7 @@ exports[`ScriptTransformer passes expected transform options to getCacheKey 1`] "waitNextEventLoopTurnForUnhandledRejectionEvents": false, "watchPathIgnorePatterns": Array [], }, - "configString": "{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_preprocessor",{"configKey":"configValue"}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]}", + "configString": "{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detailedErrorsInResults":false,"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_preprocessor",{"configKey":"configValue"}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]}", "coverageProvider": "babel", "instrument": true, "supportsDynamicImport": false, @@ -310,6 +312,7 @@ exports[`ScriptTransformer passes expected transform options to getCacheKeyAsync "coveragePathIgnorePatterns": Array [], "coverageReporters": Array [], "cwd": "/test_root_dir/", + "detailedErrorsInResults": false, "detectLeaks": false, "detectOpenHandles": false, "displayName": undefined, @@ -388,7 +391,7 @@ exports[`ScriptTransformer passes expected transform options to getCacheKeyAsync "waitNextEventLoopTurnForUnhandledRejectionEvents": false, "watchPathIgnorePatterns": Array [], }, - "configString": "{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_async_preprocessor",{"configKey":"configValue"}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]}", + "configString": "{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detailedErrorsInResults":false,"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_async_preprocessor",{"configKey":"configValue"}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]}", "coverageProvider": "babel", "instrument": true, "supportsDynamicImport": false, @@ -826,7 +829,7 @@ exports[`ScriptTransformer uses mixture of sync/async preprocessors 1`] = ` "const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"collectCoverage":false,"collectCoverageFrom":[],"coverageProvider":"babel","supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"instrument":false,"cacheFS":{},"config":{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_async_preprocessor",{}],["\\\\.css$","css-preprocessor",{}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]},"configString":"{\\"automock\\":false,\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"clearMocks\\":false,\\"collectCoverageFrom\\":[\\"src\\",\\"!public\\"],\\"coverageDirectory\\":\\"coverage\\",\\"coveragePathIgnorePatterns\\":[],\\"coverageReporters\\":[],\\"cwd\\":\\"/test_root_dir/\\",\\"detectLeaks\\":false,\\"detectOpenHandles\\":false,\\"errorOnDeprecated\\":false,\\"extensionsToTreatAsEsm\\":[],\\"fakeTimers\\":{\\"enableGlobally\\":false},\\"forceCoverageMatch\\":[],\\"globals\\":{},\\"haste\\":{},\\"id\\":\\"test\\",\\"injectGlobals\\":true,\\"moduleDirectories\\":[],\\"moduleFileExtensions\\":[\\"js\\"],\\"moduleNameMapper\\":[],\\"modulePathIgnorePatterns\\":[],\\"modulePaths\\":[],\\"openHandlesTimeout\\":1000,\\"prettierPath\\":\\"prettier\\",\\"reporters\\":[\\"default\\",\\"custom-reporter-1\\",[\\"custom-reporter-2\\",{\\"configValue\\":true}]],\\"resetMocks\\":false,\\"resetModules\\":false,\\"restoreMocks\\":false,\\"rootDir\\":\\"/\\",\\"roots\\":[],\\"runner\\":\\"jest-runner\\",\\"runtime\\":\\"/test_module_loader_path\\",\\"sandboxInjectedGlobals\\":[],\\"setupFiles\\":[],\\"setupFilesAfterEnv\\":[],\\"skipFilter\\":false,\\"skipNodeResolution\\":false,\\"slowTestThreshold\\":5,\\"snapshotFormat\\":{},\\"snapshotSerializers\\":[],\\"testEnvironment\\":\\"node\\",\\"testEnvironmentOptions\\":{},\\"testLocationInResults\\":false,\\"testMatch\\":[],\\"testPathIgnorePatterns\\":[],\\"testRegex\\":[\\"\\\\\\\\.test\\\\\\\\.js$\\"],\\"testRunner\\":\\"jest-circus/runner\\",\\"testTimeout\\":5000,\\"transform\\":[[\\"\\\\\\\\.js$\\",\\"test_async_preprocessor\\",{}],[\\"\\\\\\\\.css$\\",\\"css-preprocessor\\",{}]],\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"waitNextEventLoopTurnForUnhandledRejectionEvents\\":false,\\"watchPathIgnorePatterns\\":[]}","transformerConfig":{}}', + config: '{"collectCoverage":false,"collectCoverageFrom":[],"coverageProvider":"babel","supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"instrument":false,"cacheFS":{},"config":{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detailedErrorsInResults":false,"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_async_preprocessor",{}],["\\\\.css$","css-preprocessor",{}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]},"configString":"{\\"automock\\":false,\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"clearMocks\\":false,\\"collectCoverageFrom\\":[\\"src\\",\\"!public\\"],\\"coverageDirectory\\":\\"coverage\\",\\"coveragePathIgnorePatterns\\":[],\\"coverageReporters\\":[],\\"cwd\\":\\"/test_root_dir/\\",\\"detailedErrorsInResults\\":false,\\"detectLeaks\\":false,\\"detectOpenHandles\\":false,\\"errorOnDeprecated\\":false,\\"extensionsToTreatAsEsm\\":[],\\"fakeTimers\\":{\\"enableGlobally\\":false},\\"forceCoverageMatch\\":[],\\"globals\\":{},\\"haste\\":{},\\"id\\":\\"test\\",\\"injectGlobals\\":true,\\"moduleDirectories\\":[],\\"moduleFileExtensions\\":[\\"js\\"],\\"moduleNameMapper\\":[],\\"modulePathIgnorePatterns\\":[],\\"modulePaths\\":[],\\"openHandlesTimeout\\":1000,\\"prettierPath\\":\\"prettier\\",\\"reporters\\":[\\"default\\",\\"custom-reporter-1\\",[\\"custom-reporter-2\\",{\\"configValue\\":true}]],\\"resetMocks\\":false,\\"resetModules\\":false,\\"restoreMocks\\":false,\\"rootDir\\":\\"/\\",\\"roots\\":[],\\"runner\\":\\"jest-runner\\",\\"runtime\\":\\"/test_module_loader_path\\",\\"sandboxInjectedGlobals\\":[],\\"setupFiles\\":[],\\"setupFilesAfterEnv\\":[],\\"skipFilter\\":false,\\"skipNodeResolution\\":false,\\"slowTestThreshold\\":5,\\"snapshotFormat\\":{},\\"snapshotSerializers\\":[],\\"testEnvironment\\":\\"node\\",\\"testEnvironmentOptions\\":{},\\"testLocationInResults\\":false,\\"testMatch\\":[],\\"testPathIgnorePatterns\\":[],\\"testRegex\\":[\\"\\\\\\\\.test\\\\\\\\.js$\\"],\\"testRunner\\":\\"jest-circus/runner\\",\\"testTimeout\\":5000,\\"transform\\":[[\\"\\\\\\\\.js$\\",\\"test_async_preprocessor\\",{}],[\\"\\\\\\\\.css$\\",\\"css-preprocessor\\",{}]],\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"waitNextEventLoopTurnForUnhandledRejectionEvents\\":false,\\"watchPathIgnorePatterns\\":[]}","transformerConfig":{}}', };" `; @@ -843,7 +846,7 @@ exports[`ScriptTransformer uses multiple preprocessors 1`] = ` "const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"collectCoverage":false,"collectCoverageFrom":[],"coverageProvider":"babel","supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"instrument":false,"cacheFS":{},"config":{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_preprocessor",{}],["\\\\.css$","css-preprocessor",{}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]},"configString":"{\\"automock\\":false,\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"clearMocks\\":false,\\"collectCoverageFrom\\":[\\"src\\",\\"!public\\"],\\"coverageDirectory\\":\\"coverage\\",\\"coveragePathIgnorePatterns\\":[],\\"coverageReporters\\":[],\\"cwd\\":\\"/test_root_dir/\\",\\"detectLeaks\\":false,\\"detectOpenHandles\\":false,\\"errorOnDeprecated\\":false,\\"extensionsToTreatAsEsm\\":[],\\"fakeTimers\\":{\\"enableGlobally\\":false},\\"forceCoverageMatch\\":[],\\"globals\\":{},\\"haste\\":{},\\"id\\":\\"test\\",\\"injectGlobals\\":true,\\"moduleDirectories\\":[],\\"moduleFileExtensions\\":[\\"js\\"],\\"moduleNameMapper\\":[],\\"modulePathIgnorePatterns\\":[],\\"modulePaths\\":[],\\"openHandlesTimeout\\":1000,\\"prettierPath\\":\\"prettier\\",\\"reporters\\":[\\"default\\",\\"custom-reporter-1\\",[\\"custom-reporter-2\\",{\\"configValue\\":true}]],\\"resetMocks\\":false,\\"resetModules\\":false,\\"restoreMocks\\":false,\\"rootDir\\":\\"/\\",\\"roots\\":[],\\"runner\\":\\"jest-runner\\",\\"runtime\\":\\"/test_module_loader_path\\",\\"sandboxInjectedGlobals\\":[],\\"setupFiles\\":[],\\"setupFilesAfterEnv\\":[],\\"skipFilter\\":false,\\"skipNodeResolution\\":false,\\"slowTestThreshold\\":5,\\"snapshotFormat\\":{},\\"snapshotSerializers\\":[],\\"testEnvironment\\":\\"node\\",\\"testEnvironmentOptions\\":{},\\"testLocationInResults\\":false,\\"testMatch\\":[],\\"testPathIgnorePatterns\\":[],\\"testRegex\\":[\\"\\\\\\\\.test\\\\\\\\.js$\\"],\\"testRunner\\":\\"jest-circus/runner\\",\\"testTimeout\\":5000,\\"transform\\":[[\\"\\\\\\\\.js$\\",\\"test_preprocessor\\",{}],[\\"\\\\\\\\.css$\\",\\"css-preprocessor\\",{}]],\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"waitNextEventLoopTurnForUnhandledRejectionEvents\\":false,\\"watchPathIgnorePatterns\\":[]}","transformerConfig":{}}', + config: '{"collectCoverage":false,"collectCoverageFrom":[],"coverageProvider":"babel","supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"instrument":false,"cacheFS":{},"config":{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detailedErrorsInResults":false,"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_preprocessor",{}],["\\\\.css$","css-preprocessor",{}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]},"configString":"{\\"automock\\":false,\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"clearMocks\\":false,\\"collectCoverageFrom\\":[\\"src\\",\\"!public\\"],\\"coverageDirectory\\":\\"coverage\\",\\"coveragePathIgnorePatterns\\":[],\\"coverageReporters\\":[],\\"cwd\\":\\"/test_root_dir/\\",\\"detailedErrorsInResults\\":false,\\"detectLeaks\\":false,\\"detectOpenHandles\\":false,\\"errorOnDeprecated\\":false,\\"extensionsToTreatAsEsm\\":[],\\"fakeTimers\\":{\\"enableGlobally\\":false},\\"forceCoverageMatch\\":[],\\"globals\\":{},\\"haste\\":{},\\"id\\":\\"test\\",\\"injectGlobals\\":true,\\"moduleDirectories\\":[],\\"moduleFileExtensions\\":[\\"js\\"],\\"moduleNameMapper\\":[],\\"modulePathIgnorePatterns\\":[],\\"modulePaths\\":[],\\"openHandlesTimeout\\":1000,\\"prettierPath\\":\\"prettier\\",\\"reporters\\":[\\"default\\",\\"custom-reporter-1\\",[\\"custom-reporter-2\\",{\\"configValue\\":true}]],\\"resetMocks\\":false,\\"resetModules\\":false,\\"restoreMocks\\":false,\\"rootDir\\":\\"/\\",\\"roots\\":[],\\"runner\\":\\"jest-runner\\",\\"runtime\\":\\"/test_module_loader_path\\",\\"sandboxInjectedGlobals\\":[],\\"setupFiles\\":[],\\"setupFilesAfterEnv\\":[],\\"skipFilter\\":false,\\"skipNodeResolution\\":false,\\"slowTestThreshold\\":5,\\"snapshotFormat\\":{},\\"snapshotSerializers\\":[],\\"testEnvironment\\":\\"node\\",\\"testEnvironmentOptions\\":{},\\"testLocationInResults\\":false,\\"testMatch\\":[],\\"testPathIgnorePatterns\\":[],\\"testRegex\\":[\\"\\\\\\\\.test\\\\\\\\.js$\\"],\\"testRunner\\":\\"jest-circus/runner\\",\\"testTimeout\\":5000,\\"transform\\":[[\\"\\\\\\\\.js$\\",\\"test_preprocessor\\",{}],[\\"\\\\\\\\.css$\\",\\"css-preprocessor\\",{}]],\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"waitNextEventLoopTurnForUnhandledRejectionEvents\\":false,\\"watchPathIgnorePatterns\\":[]}","transformerConfig":{}}', };" `; @@ -860,7 +863,7 @@ exports[`ScriptTransformer uses the supplied preprocessor 1`] = ` "const TRANSFORMED = { filename: '/fruits/banana.js', script: 'module.exports = "banana";', - config: '{"collectCoverage":false,"collectCoverageFrom":[],"coverageProvider":"babel","supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"instrument":false,"cacheFS":{},"config":{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_preprocessor",{}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]},"configString":"{\\"automock\\":false,\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"clearMocks\\":false,\\"collectCoverageFrom\\":[\\"src\\",\\"!public\\"],\\"coverageDirectory\\":\\"coverage\\",\\"coveragePathIgnorePatterns\\":[],\\"coverageReporters\\":[],\\"cwd\\":\\"/test_root_dir/\\",\\"detectLeaks\\":false,\\"detectOpenHandles\\":false,\\"errorOnDeprecated\\":false,\\"extensionsToTreatAsEsm\\":[],\\"fakeTimers\\":{\\"enableGlobally\\":false},\\"forceCoverageMatch\\":[],\\"globals\\":{},\\"haste\\":{},\\"id\\":\\"test\\",\\"injectGlobals\\":true,\\"moduleDirectories\\":[],\\"moduleFileExtensions\\":[\\"js\\"],\\"moduleNameMapper\\":[],\\"modulePathIgnorePatterns\\":[],\\"modulePaths\\":[],\\"openHandlesTimeout\\":1000,\\"prettierPath\\":\\"prettier\\",\\"reporters\\":[\\"default\\",\\"custom-reporter-1\\",[\\"custom-reporter-2\\",{\\"configValue\\":true}]],\\"resetMocks\\":false,\\"resetModules\\":false,\\"restoreMocks\\":false,\\"rootDir\\":\\"/\\",\\"roots\\":[],\\"runner\\":\\"jest-runner\\",\\"runtime\\":\\"/test_module_loader_path\\",\\"sandboxInjectedGlobals\\":[],\\"setupFiles\\":[],\\"setupFilesAfterEnv\\":[],\\"skipFilter\\":false,\\"skipNodeResolution\\":false,\\"slowTestThreshold\\":5,\\"snapshotFormat\\":{},\\"snapshotSerializers\\":[],\\"testEnvironment\\":\\"node\\",\\"testEnvironmentOptions\\":{},\\"testLocationInResults\\":false,\\"testMatch\\":[],\\"testPathIgnorePatterns\\":[],\\"testRegex\\":[\\"\\\\\\\\.test\\\\\\\\.js$\\"],\\"testRunner\\":\\"jest-circus/runner\\",\\"testTimeout\\":5000,\\"transform\\":[[\\"\\\\\\\\.js$\\",\\"test_preprocessor\\",{}]],\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"waitNextEventLoopTurnForUnhandledRejectionEvents\\":false,\\"watchPathIgnorePatterns\\":[]}","transformerConfig":{}}', + config: '{"collectCoverage":false,"collectCoverageFrom":[],"coverageProvider":"babel","supportsDynamicImport":false,"supportsExportNamespaceFrom":false,"supportsStaticESM":false,"supportsTopLevelAwait":false,"instrument":false,"cacheFS":{},"config":{"automock":false,"cache":true,"cacheDirectory":"/cache/","clearMocks":false,"collectCoverageFrom":["src","!public"],"coverageDirectory":"coverage","coveragePathIgnorePatterns":[],"coverageReporters":[],"cwd":"/test_root_dir/","detailedErrorsInResults":false,"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extensionsToTreatAsEsm":[],"fakeTimers":{"enableGlobally":false},"forceCoverageMatch":[],"globals":{},"haste":{},"id":"test","injectGlobals":true,"moduleDirectories":[],"moduleFileExtensions":["js"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"modulePaths":[],"openHandlesTimeout":1000,"prettierPath":"prettier","reporters":["default","custom-reporter-1",["custom-reporter-2",{"configValue":true}]],"resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/","roots":[],"runner":"jest-runner","runtime":"/test_module_loader_path","sandboxInjectedGlobals":[],"setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"skipNodeResolution":false,"slowTestThreshold":5,"snapshotFormat":{},"snapshotSerializers":[],"testEnvironment":"node","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":[],"testPathIgnorePatterns":[],"testRegex":["\\\\.test\\\\.js$"],"testRunner":"jest-circus/runner","testTimeout":5000,"transform":[["\\\\.js$","test_preprocessor",{}]],"transformIgnorePatterns":["/node_modules/"],"waitNextEventLoopTurnForUnhandledRejectionEvents":false,"watchPathIgnorePatterns":[]},"configString":"{\\"automock\\":false,\\"cache\\":true,\\"cacheDirectory\\":\\"/cache/\\",\\"clearMocks\\":false,\\"collectCoverageFrom\\":[\\"src\\",\\"!public\\"],\\"coverageDirectory\\":\\"coverage\\",\\"coveragePathIgnorePatterns\\":[],\\"coverageReporters\\":[],\\"cwd\\":\\"/test_root_dir/\\",\\"detailedErrorsInResults\\":false,\\"detectLeaks\\":false,\\"detectOpenHandles\\":false,\\"errorOnDeprecated\\":false,\\"extensionsToTreatAsEsm\\":[],\\"fakeTimers\\":{\\"enableGlobally\\":false},\\"forceCoverageMatch\\":[],\\"globals\\":{},\\"haste\\":{},\\"id\\":\\"test\\",\\"injectGlobals\\":true,\\"moduleDirectories\\":[],\\"moduleFileExtensions\\":[\\"js\\"],\\"moduleNameMapper\\":[],\\"modulePathIgnorePatterns\\":[],\\"modulePaths\\":[],\\"openHandlesTimeout\\":1000,\\"prettierPath\\":\\"prettier\\",\\"reporters\\":[\\"default\\",\\"custom-reporter-1\\",[\\"custom-reporter-2\\",{\\"configValue\\":true}]],\\"resetMocks\\":false,\\"resetModules\\":false,\\"restoreMocks\\":false,\\"rootDir\\":\\"/\\",\\"roots\\":[],\\"runner\\":\\"jest-runner\\",\\"runtime\\":\\"/test_module_loader_path\\",\\"sandboxInjectedGlobals\\":[],\\"setupFiles\\":[],\\"setupFilesAfterEnv\\":[],\\"skipFilter\\":false,\\"skipNodeResolution\\":false,\\"slowTestThreshold\\":5,\\"snapshotFormat\\":{},\\"snapshotSerializers\\":[],\\"testEnvironment\\":\\"node\\",\\"testEnvironmentOptions\\":{},\\"testLocationInResults\\":false,\\"testMatch\\":[],\\"testPathIgnorePatterns\\":[],\\"testRegex\\":[\\"\\\\\\\\.test\\\\\\\\.js$\\"],\\"testRunner\\":\\"jest-circus/runner\\",\\"testTimeout\\":5000,\\"transform\\":[[\\"\\\\\\\\.js$\\",\\"test_preprocessor\\",{}]],\\"transformIgnorePatterns\\":[\\"/node_modules/\\"],\\"waitNextEventLoopTurnForUnhandledRejectionEvents\\":false,\\"watchPathIgnorePatterns\\":[]}","transformerConfig":{}}', };" `; diff --git a/packages/jest-types/src/Circus.ts b/packages/jest-types/src/Circus.ts index dbd87e6f8780..17aeee1e0ac9 100644 --- a/packages/jest-types/src/Circus.ts +++ b/packages/jest-types/src/Circus.ts @@ -100,6 +100,9 @@ export type AsyncEvent = | { name: 'include_test_location_in_result'; } + | { + name: 'include_detailed_errors_in_result'; + } | { name: 'hook_start'; hook: Hook; @@ -248,6 +251,7 @@ export type State = { testTimeout: number; unhandledErrors: Array; includeTestLocationInResult: boolean; + includeDetailedErrorsInResult: boolean; maxConcurrency: number; unhandledRejectionErrorByPromise: Map, Exception>; }; diff --git a/packages/jest-types/src/Config.ts b/packages/jest-types/src/Config.ts index 5055d386195e..995bd0f8fbf6 100644 --- a/packages/jest-types/src/Config.ts +++ b/packages/jest-types/src/Config.ts @@ -160,6 +160,7 @@ export type DefaultOptions = { coveragePathIgnorePatterns: Array; coverageReporters: Array; coverageProvider: CoverageProvider; + detailedErrorsInResults: boolean; detectLeaks: boolean; detectOpenHandles: boolean; errorOnDeprecated: boolean; @@ -336,6 +337,7 @@ export type ProjectConfig = { coverageReporters: CoverageReporters; cwd: string; dependencyExtractor?: string; + detailedErrorsInResults: boolean; detectLeaks: boolean; detectOpenHandles: boolean; displayName?: DisplayName; diff --git a/packages/test-utils/src/config.ts b/packages/test-utils/src/config.ts index 383d0afc0768..39336ea516bf 100644 --- a/packages/test-utils/src/config.ts +++ b/packages/test-utils/src/config.ts @@ -79,6 +79,7 @@ const DEFAULT_PROJECT_CONFIG: Config.ProjectConfig = { coveragePathIgnorePatterns: [], coverageReporters: [], cwd: '/test_root_dir/', + detailedErrorsInResults: false, detectLeaks: false, detectOpenHandles: false, displayName: undefined,