diff --git a/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap index 890e0f7087cf..29f8228c7c3d 100644 --- a/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap +++ b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Upgrade help logs a warning when \`scriptPreprocessor\` and/or \`preprocessorIgnorePatterns\` are used 1`] = ` -" Deprecation Warning: +" Deprecation Warning: Option \\"preprocessorIgnorePatterns\\" was replaced by \\"transformIgnorePatterns\\", which support multiple preprocessors. @@ -28,7 +28,7 @@ exports[`displayName generates a default color for the runner jest-runner-tslint exports[`displayName generates a default color for the runner undefined 1`] = `"white"`; exports[`displayName should throw an error when displayName is is an empty object 1`] = ` -"Validation Error: +"Validation Error: Option \\"displayName\\" must be of type: @@ -44,7 +44,7 @@ exports[`displayName should throw an error when displayName is is an empty objec `; exports[`displayName should throw an error when displayName is missing color 1`] = ` -"Validation Error: +"Validation Error: Option \\"displayName\\" must be of type: @@ -60,7 +60,7 @@ exports[`displayName should throw an error when displayName is missing color 1`] `; exports[`displayName should throw an error when displayName is missing name 1`] = ` -"Validation Error: +"Validation Error: Option \\"displayName\\" must be of type: @@ -76,7 +76,7 @@ exports[`displayName should throw an error when displayName is missing name 1`] `; exports[`displayName should throw an error when displayName is using invalid values 1`] = ` -"Validation Error: +"Validation Error: Option \\"displayName\\" must be of type: @@ -92,7 +92,7 @@ exports[`displayName should throw an error when displayName is using invalid val `; exports[`preset throws when module was found but no "jest-preset.js" or "jest-preset.json" files 1`] = ` -"Validation Error: +"Validation Error: Module exist-but-no-jest-preset should have \\"jest-preset.js\\" or \\"jest-preset.json\\" file at the root. @@ -102,7 +102,7 @@ exports[`preset throws when module was found but no "jest-preset.js" or "jest-pr `; exports[`preset throws when preset not found 1`] = ` -"Validation Error: +"Validation Error: Preset doesnt-exist not found. @@ -112,7 +112,7 @@ exports[`preset throws when preset not found 1`] = ` `; exports[`rootDir throws if the options is missing a rootDir property 1`] = ` -"Validation Error: +"Validation Error: Configuration option rootDir must be specified. @@ -122,7 +122,7 @@ exports[`rootDir throws if the options is missing a rootDir property 1`] = ` `; exports[`runner throw error when a runner is not found 1`] = ` -"Validation Error: +"Validation Error: Jest Runner missing-runner cannot be found. Make sure the runner configuration option points to an existing node module. @@ -132,7 +132,7 @@ exports[`runner throw error when a runner is not found 1`] = ` `; exports[`setupTestFrameworkScriptFile logs a deprecation warning when \`setupTestFrameworkScriptFile\` is used 1`] = ` -" Deprecation Warning: +" Deprecation Warning: Option \\"setupTestFrameworkScriptFile\\" was replaced by configuration \\"setupFilesAfterEnv\\", which supports multiple paths. @@ -144,7 +144,7 @@ exports[`setupTestFrameworkScriptFile logs a deprecation warning when \`setupTes `; exports[`setupTestFrameworkScriptFile logs an error when \`setupTestFrameworkScriptFile\` and \`setupFilesAfterEnv\` are used 1`] = ` -"Validation Error: +"Validation Error: Options: setupTestFrameworkScriptFile and setupFilesAfterEnv cannot be used together. Please change your configuration to only use setupFilesAfterEnv. @@ -155,7 +155,7 @@ exports[`setupTestFrameworkScriptFile logs an error when \`setupTestFrameworkScr `; exports[`testEnvironment throws on invalid environment names 1`] = ` -"Validation Error: +"Validation Error: Test environment phantom cannot be found. Make sure the testEnvironment configuration option points to an existing node module. @@ -165,7 +165,7 @@ exports[`testEnvironment throws on invalid environment names 1`] = ` `; exports[`testMatch throws if testRegex and testMatch are both specified 1`] = ` -"Validation Error: +"Validation Error: Configuration options testMatch and testRegex cannot be used together. @@ -179,7 +179,7 @@ exports[`testPathPattern ignores invalid regular expressions exports[`testPathPattern --testPathPattern ignores invalid regular expressions and logs a warning 1`] = `" Invalid testPattern a( supplied. Running all tests instead."`; exports[`testTimeout should throw an error if timeout is a negative number 1`] = ` -"Validation Error: +"Validation Error: Option \\"testTimeout\\" must be a natural number. @@ -189,7 +189,7 @@ exports[`testTimeout should throw an error if timeout is a negative number 1`] = `; exports[`watchPlugins throw error when a watch plugin is not found 1`] = ` -"Validation Error: +"Validation Error: Watch plugin missing-plugin cannot be found. Make sure the watchPlugins configuration option points to an existing node module. diff --git a/packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js b/packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js index b6524599da47..af11788ab076 100644 --- a/packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js +++ b/packages/jest-core/src/__tests__/SnapshotInteractiveMode.test.js @@ -27,7 +27,7 @@ jest }); jest.doMock('chalk', () => - Object.assign(new chalk.constructor({enabled: false}), { + Object.assign(new chalk.Instance({level: 0}), { stripColor: str => str, }), ); diff --git a/packages/jest-core/src/__tests__/__snapshots__/SnapshotInteractiveMode.test.js.snap b/packages/jest-core/src/__tests__/__snapshots__/SnapshotInteractiveMode.test.js.snap index 7eb11da97da9..411444957a8b 100644 --- a/packages/jest-core/src/__tests__/__snapshots__/SnapshotInteractiveMode.test.js.snap +++ b/packages/jest-core/src/__tests__/__snapshots__/SnapshotInteractiveMode.test.js.snap @@ -5,7 +5,7 @@ exports[`SnapshotInteractiveMode skip 1 test, then quit 1`] = ` [MOCK - eraseDown] Interactive Snapshot Progress - › 1 snapshot remaining + › 1 snapshot remaining Watch Usage › Press u to update failing snapshots for this test. @@ -19,7 +19,7 @@ exports[`SnapshotInteractiveMode skip 1 test, then quit 2`] = ` "[MOCK - clear] Interactive Snapshot Result - › 1 snapshot reviewed, 1 snapshot skipped + › 1 snapshot reviewed, 1 snapshot skipped Watch Usage › Press r to restart Interactive Snapshot Mode. @@ -32,7 +32,7 @@ exports[`SnapshotInteractiveMode skip 1 test, then restart 1`] = ` [MOCK - eraseDown] Interactive Snapshot Progress - › 1 snapshot remaining + › 1 snapshot remaining Watch Usage › Press u to update failing snapshots for this test. @@ -46,7 +46,7 @@ exports[`SnapshotInteractiveMode skip 1 test, then restart 2`] = ` "[MOCK - clear] Interactive Snapshot Result - › 1 snapshot reviewed, 1 snapshot skipped + › 1 snapshot reviewed, 1 snapshot skipped Watch Usage › Press r to restart Interactive Snapshot Mode. @@ -59,7 +59,7 @@ exports[`SnapshotInteractiveMode skip 1 test, then restart 3`] = ` [MOCK - eraseDown] Interactive Snapshot Progress - › 1 snapshot remaining + › 1 snapshot remaining Watch Usage › Press u to update failing snapshots for this test. @@ -74,7 +74,7 @@ exports[`SnapshotInteractiveMode skip 1 test, update 1 test, then finish and res [MOCK - eraseDown] Interactive Snapshot Progress - › 2 snapshots remaining + › 2 snapshots remaining Watch Usage › Press u to update failing snapshots for this test. @@ -89,7 +89,7 @@ exports[`SnapshotInteractiveMode skip 1 test, update 1 test, then finish and res [MOCK - eraseDown] Interactive Snapshot Progress - › 1 snapshot remaining, 1 snapshot skipped + › 1 snapshot remaining, 1 snapshot skipped Watch Usage › Press u to update failing snapshots for this test. @@ -103,7 +103,7 @@ exports[`SnapshotInteractiveMode skip 1 test, update 1 test, then finish and res "[MOCK - clear] Interactive Snapshot Result - › 2 snapshots reviewed, 1 snapshot updated, 1 snapshot skipped + › 2 snapshots reviewed, 1 snapshot updated, 1 snapshot skipped Watch Usage › Press r to restart Interactive Snapshot Mode. @@ -116,7 +116,7 @@ exports[`SnapshotInteractiveMode skip 1 test, update 1 test, then finish and res [MOCK - eraseDown] Interactive Snapshot Progress - › 1 snapshot remaining + › 1 snapshot remaining Watch Usage › Press u to update failing snapshots for this test. @@ -131,7 +131,7 @@ exports[`SnapshotInteractiveMode skip 2 tests, then finish and restart 1`] = ` [MOCK - eraseDown] Interactive Snapshot Progress - › 2 snapshots remaining + › 2 snapshots remaining Watch Usage › Press u to update failing snapshots for this test. @@ -146,7 +146,7 @@ exports[`SnapshotInteractiveMode skip 2 tests, then finish and restart 2`] = ` [MOCK - eraseDown] Interactive Snapshot Progress - › 1 snapshot remaining, 1 snapshot skipped + › 1 snapshot remaining, 1 snapshot skipped Watch Usage › Press u to update failing snapshots for this test. @@ -160,7 +160,7 @@ exports[`SnapshotInteractiveMode skip 2 tests, then finish and restart 3`] = ` "[MOCK - clear] Interactive Snapshot Result - › 2 snapshots reviewed, 2 snapshots skipped + › 2 snapshots reviewed, 2 snapshots skipped Watch Usage › Press r to restart Interactive Snapshot Mode. @@ -173,7 +173,7 @@ exports[`SnapshotInteractiveMode skip 2 tests, then finish and restart 4`] = ` [MOCK - eraseDown] Interactive Snapshot Progress - › 2 snapshots remaining + › 2 snapshots remaining Watch Usage › Press u to update failing snapshots for this test. @@ -188,7 +188,7 @@ exports[`SnapshotInteractiveMode update 1 test, skip 1 test, then finish and res [MOCK - eraseDown] Interactive Snapshot Progress - › 2 snapshots remaining + › 2 snapshots remaining Watch Usage › Press u to update failing snapshots for this test. @@ -203,7 +203,7 @@ exports[`SnapshotInteractiveMode update 1 test, skip 1 test, then finish and res [MOCK - eraseDown] Interactive Snapshot Progress - › 1 snapshot remaining, 1 snapshot updated + › 1 snapshot remaining, 1 snapshot updated Watch Usage › Press u to update failing snapshots for this test. @@ -217,7 +217,7 @@ exports[`SnapshotInteractiveMode update 1 test, skip 1 test, then finish and res "[MOCK - clear] Interactive Snapshot Result - › 2 snapshots reviewed, 1 snapshot updated, 1 snapshot skipped + › 2 snapshots reviewed, 1 snapshot updated, 1 snapshot skipped Watch Usage › Press r to restart Interactive Snapshot Mode. @@ -230,7 +230,7 @@ exports[`SnapshotInteractiveMode update 1 test, skip 1 test, then finish and res [MOCK - eraseDown] Interactive Snapshot Progress - › 1 snapshot remaining + › 1 snapshot remaining Watch Usage › Press u to update failing snapshots for this test. @@ -245,7 +245,7 @@ exports[`SnapshotInteractiveMode update 1 test, then finish and return 1`] = ` [MOCK - eraseDown] Interactive Snapshot Progress - › 1 snapshot remaining + › 1 snapshot remaining Watch Usage › Press u to update failing snapshots for this test. @@ -259,7 +259,7 @@ exports[`SnapshotInteractiveMode update 1 test, then finish and return 2`] = ` "[MOCK - clear] Interactive Snapshot Result - › 1 snapshot reviewed, 1 snapshot updated + › 1 snapshot reviewed, 1 snapshot updated Watch Usage › Press Enter to return to watch mode. @@ -271,7 +271,7 @@ exports[`SnapshotInteractiveMode update 2 tests, then finish and return 1`] = ` [MOCK - eraseDown] Interactive Snapshot Progress - › 2 snapshots remaining + › 2 snapshots remaining Watch Usage › Press u to update failing snapshots for this test. @@ -286,7 +286,7 @@ exports[`SnapshotInteractiveMode update 2 tests, then finish and return 2`] = ` [MOCK - eraseDown] Interactive Snapshot Progress - › 1 snapshot remaining, 1 snapshot updated + › 1 snapshot remaining, 1 snapshot updated Watch Usage › Press u to update failing snapshots for this test. @@ -300,7 +300,7 @@ exports[`SnapshotInteractiveMode update 2 tests, then finish and return 3`] = ` "[MOCK - clear] Interactive Snapshot Result - › 2 snapshots reviewed, 2 snapshots updated + › 2 snapshots reviewed, 2 snapshots updated Watch Usage › Press Enter to return to watch mode. diff --git a/packages/jest-core/src/__tests__/watch.test.js b/packages/jest-core/src/__tests__/watch.test.js index 358446807c64..84e55a43dee0 100644 --- a/packages/jest-core/src/__tests__/watch.test.js +++ b/packages/jest-core/src/__tests__/watch.test.js @@ -42,7 +42,7 @@ jest.mock( }, ); -jest.doMock('chalk', () => new chalk.constructor({enabled: false})); +jest.doMock('chalk', () => new chalk.Instance({level: 0})); jest.doMock( '../runJest', () => diff --git a/packages/jest-core/src/__tests__/watch_filename_pattern_mode.test.js b/packages/jest-core/src/__tests__/watch_filename_pattern_mode.test.js index bfd1efab9f54..30374f5e2623 100644 --- a/packages/jest-core/src/__tests__/watch_filename_pattern_mode.test.js +++ b/packages/jest-core/src/__tests__/watch_filename_pattern_mode.test.js @@ -64,7 +64,7 @@ jest.mock( }, ); -jest.doMock('chalk', () => new chalk.constructor({enabled: false})); +jest.doMock('chalk', () => new chalk.Instance({level: 0})); jest.doMock('strip-ansi'); require('strip-ansi').mockImplementation(str => str); diff --git a/packages/jest-core/src/__tests__/watch_test_name_pattern_mode.test.js b/packages/jest-core/src/__tests__/watch_test_name_pattern_mode.test.js index 00963e501753..bfaa38f6b13f 100644 --- a/packages/jest-core/src/__tests__/watch_test_name_pattern_mode.test.js +++ b/packages/jest-core/src/__tests__/watch_test_name_pattern_mode.test.js @@ -40,7 +40,7 @@ jest.mock( }, ); -jest.doMock('chalk', () => new chalk.constructor({enabled: false})); +jest.doMock('chalk', () => new chalk.Instance({level: 0})); jest.doMock('strip-ansi'); require('strip-ansi').mockImplementation(str => str); diff --git a/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.ts.snap b/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.ts.snap index 95b567d67a3f..8fb8249ca9b5 100644 --- a/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.ts.snap +++ b/packages/jest-message-util/src/__tests__/__snapshots__/messages.test.ts.snap @@ -8,7 +8,7 @@ exports[`.formatExecError() 1`] = ` `; exports[`formatStackTrace should strip node internals 1`] = ` -" Unix test +" Unix test Expected value to be of type: @@ -18,21 +18,21 @@ exports[`formatStackTrace should strip node internals 1`] = ` type: \\"string\\" - at Object.it (__tests__/test.js:8:14) - at internal/process/next_tick.js:188:7 + at Object.it (__tests__/test.js:8:14) + at internal/process/next_tick.js:188:7 " `; exports[`retains message in babel code frame error 1`] = ` -" Babel test +" Babel test packages/react/src/forwardRef.js: Unexpected token, expected , (20:10) 18 | false, 19 | 'forwardRef requires a render function but received a \`memo\` ' - > 20 | 'component. Instead of forwardRef(memo(...)), use ' + - | ^ + > 20 | 'component. Instead of forwardRef(memo(...)), use ' + + | ^ 21 | 'memo(forwardRef(...)).', 22 | ); 23 | } else if (typeof render !== 'function') { @@ -40,17 +40,17 @@ exports[`retains message in babel code frame error 1`] = ` `; exports[`should exclude jasmine from stack trace for Unix paths. 1`] = ` -" Unix test +" Unix test at stack (../jest-jasmine2/build/jasmine-2.4.1.js:1580:17) - at Object.addResult (../jest-jasmine2/build/jasmine-2.4.1.js:1550:14) - at Object.it (build/__tests__/messages-test.js:45:41) + at Object.addResult (../jest-jasmine2/build/jasmine-2.4.1.js:1550:14) + at Object.it (build/__tests__/messages-test.js:45:41) " `; exports[`should not exclude vendor from stack trace 1`] = ` -" Vendor test +" Vendor test Expected value to be of type: @@ -60,7 +60,7 @@ exports[`should not exclude vendor from stack trace 1`] = ` type: \\"string\\" - at Object.it (__tests__/vendor/cool_test.js:6:666) - at Object.asyncFn (__tests__/vendor/sulu/node_modules/sulu-content-bundle/best_component.js:1:5) + at Object.it (__tests__/vendor/cool_test.js:6:666) + at Object.asyncFn (__tests__/vendor/sulu/node_modules/sulu-content-bundle/best_component.js:1:5) " `; diff --git a/packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap b/packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap index 5834cb065fdc..eeaf59c1a094 100644 --- a/packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap +++ b/packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap @@ -1,12 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Repeated types within multiple valid examples are coalesced in error report 1`] = ` -" Validation Error: +" Validation Error: Option \\"foo\\" must be of type: - string or number + string or number but instead received: - boolean + boolean Example: { @@ -28,7 +28,7 @@ exports[`Repeated types within multiple valid examples are coalesced in error re `; exports[`displays warning for deprecated config options 1`] = ` -" Deprecation Warning: +" Deprecation Warning: Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. @@ -42,7 +42,7 @@ exports[`displays warning for deprecated config options 1`] = ` `; exports[`displays warning for unknown config options 1`] = ` -" Validation Warning: +" Validation Warning: Unknown option \\"unkwon\\" with value {} was found. Did you mean \\"unknown\\"? This is probably a typing mistake. Fixing it will remove this message. @@ -50,12 +50,12 @@ exports[`displays warning for unknown config options 1`] = ` `; exports[`pretty prints valid config for Array 1`] = ` -" Validation Error: +" Validation Error: Option \\"coverageReporters\\" must be of type: - array + array but instead received: - object + object Example: { @@ -70,12 +70,12 @@ exports[`pretty prints valid config for Array 1`] = ` `; exports[`pretty prints valid config for Boolean 1`] = ` -" Validation Error: +" Validation Error: Option \\"automock\\" must be of type: - boolean + boolean but instead received: - array + array Example: { @@ -85,12 +85,12 @@ exports[`pretty prints valid config for Boolean 1`] = ` `; exports[`pretty prints valid config for Function 1`] = ` -" Validation Error: +" Validation Error: Option \\"fn\\" must be of type: - function + function but instead received: - string + string Example: { @@ -100,12 +100,12 @@ exports[`pretty prints valid config for Function 1`] = ` `; exports[`pretty prints valid config for Object 1`] = ` -" Validation Error: +" Validation Error: Option \\"haste\\" must be of type: - object + object but instead received: - number + number Example: { @@ -120,12 +120,12 @@ exports[`pretty prints valid config for Object 1`] = ` `; exports[`pretty prints valid config for String 1`] = ` -" Validation Error: +" Validation Error: Option \\"preset\\" must be of type: - string + string but instead received: - number + number Example: { @@ -135,12 +135,12 @@ exports[`pretty prints valid config for String 1`] = ` `; exports[`reports errors nicely when failing with multiple valid options 1`] = ` -" Validation Error: +" Validation Error: Option \\"foo\\" must be of type: - string or array + string or array but instead received: - number + number Example: { @@ -176,9 +176,9 @@ exports[`works with custom errors 1`] = ` "My Custom Error: Option \\"test\\" must be of type: - array + array but instead received: - string + string Example: { diff --git a/packages/jest-validate/src/__tests__/__snapshots__/validateCLIOptions.test.js.snap b/packages/jest-validate/src/__tests__/__snapshots__/validateCLIOptions.test.js.snap index 3bdd2c0bb8b5..dc3b83921154 100644 --- a/packages/jest-validate/src/__tests__/__snapshots__/validateCLIOptions.test.js.snap +++ b/packages/jest-validate/src/__tests__/__snapshots__/validateCLIOptions.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`fails for multiple unknown options 1`] = ` -" Unrecognized CLI Parameters: +" Unrecognized CLI Parameters: Following options were not recognized: [\\"jest\\", \\"test\\"] @@ -12,7 +12,7 @@ exports[`fails for multiple unknown options 1`] = ` `; exports[`fails for unknown option 1`] = ` -" Unrecognized CLI Parameter: +" Unrecognized CLI Parameter: Unrecognized option \\"unknown\\".