diff --git a/CHANGELOG.md b/CHANGELOG.md index bf8893b6b24f..670867b065e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,11 +8,11 @@ - `[jest-changed-files]` Fix a lock-up after repeated invocations ([#12757](https://github.com/facebook/jest/issues/12757)) - `[@jest/expect-utils]` Fix deep equality of ImmutableJS OrderedSets ([#12977](https://github.com/facebook/jest/pull/12977)) -- `[jest-snapshot]` Fix indendation of awaited inline snapshots ([#12986](https://github.com/facebook/jest/pull/12986)) +- `[jest-snapshot]` Fix indentation of awaited inline snapshots ([#12986](https://github.com/facebook/jest/pull/12986)) ### Chore & Maintenance -- `[*]` Replace internal usage of `pretty-format/ConvertAnsi` with `jest-serializer-ansi-escapes` ([#12935](https://github.com/facebook/jest/pull/12935)) +- `[*]` Replace internal usage of `pretty-format/ConvertAnsi` with `jest-serializer-ansi-escapes` ([#12935](https://github.com/facebook/jest/pull/12935), [#13004](https://github.com/facebook/jest/pull/13004)) ### Performance diff --git a/package.json b/package.json index 8dea7072ea8c..c20f3cc31c01 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "jest-junit": "^13.0.0", "jest-mock": "workspace:*", "jest-runner-tsd": "^3.1.0", - "jest-serializer-ansi-escapes": "^1.0.0", + "jest-serializer-ansi-escapes": "^2.0.1", "jest-silent-reporter": "^0.5.0", "jest-snapshot": "workspace:*", "jest-watch-typeahead": "^1.1.0", diff --git a/packages/jest-config/src/__tests__/__snapshots__/normalize.test.ts.snap b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.ts.snap index 00386d08b28c..80f0dc76e6e5 100644 --- a/packages/jest-config/src/__tests__/__snapshots__/normalize.test.ts.snap +++ b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.ts.snap @@ -11,121 +11,121 @@ 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: - - Option "displayName" must be of type: - - { - name: string; - color: string; - } - - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Option "displayName" must be of type: + + { + name: string; + color: string; + } + + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`displayName should throw an error when displayName is missing color 1`] = ` -"Validation Error: - - Option "displayName" must be of type: - - { - name: string; - color: string; - } - - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Option "displayName" must be of type: + + { + name: string; + color: string; + } + + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`displayName should throw an error when displayName is missing name 1`] = ` -"Validation Error: - - Option "displayName" must be of type: - - { - name: string; - color: string; - } - - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Option "displayName" must be of type: + + { + name: string; + color: string; + } + + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`displayName should throw an error when displayName is using invalid values 1`] = ` -"Validation Error: - - Option "displayName" must be of type: - - { - name: string; - color: string; - } - - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Option "displayName" must be of type: + + { + name: string; + color: string; + } + + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`extensionsToTreatAsEsm should enforce leading dots 1`] = ` -"Validation Error: - - Option: extensionsToTreatAsEsm: ['ts'] includes a string that does not start with a period (.). - Please change your configuration to extensionsToTreatAsEsm: ['.ts']. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Option: extensionsToTreatAsEsm: ['ts'] includes a string that does not start with a period (.). + Please change your configuration to extensionsToTreatAsEsm: ['.ts']. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`extensionsToTreatAsEsm throws on .cjs 1`] = ` -"Validation Error: - - Option: extensionsToTreatAsEsm: ['.cjs'] includes '.cjs' which is always treated as CommonJS. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Option: extensionsToTreatAsEsm: ['.cjs'] includes '.cjs' which is always treated as CommonJS. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`extensionsToTreatAsEsm throws on .js 1`] = ` -"Validation Error: - - Option: extensionsToTreatAsEsm: ['.js'] includes '.js' which is always inferred based on type in its nearest package.json. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Option: extensionsToTreatAsEsm: ['.js'] includes '.js' which is always inferred based on type in its nearest package.json. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`extensionsToTreatAsEsm throws on .mjs 1`] = ` -"Validation Error: - - Option: extensionsToTreatAsEsm: ['.mjs'] includes '.mjs' which is always treated as an ECMAScript Module. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Option: extensionsToTreatAsEsm: ['.mjs'] includes '.mjs' which is always treated as an ECMAScript Module. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`logs a deprecation warning when 'browser' option is passed 1`] = ` [MockFunction] { "calls": Array [ Array [ - " Deprecation Warning: - - Option "browser" has been deprecated. Please install "browser-resolve" and use the "resolver" option in Jest configuration as shown in the documentation: https://jestjs.io/docs/configuration#resolver-string - - Configuration Documentation: - https://jestjs.io/docs/configuration -", + " Deprecation Warning: + + Option "browser" has been deprecated. Please install "browser-resolve" and use the "resolver" option in Jest configuration as shown in the documentation: https://jestjs.io/docs/configuration#resolver-string + + Configuration Documentation: + https://jestjs.io/docs/configuration +", ], ], "results": Array [ @@ -141,15 +141,15 @@ exports[`logs a deprecation warning when 'extraGlobals' option is passed 1`] = ` [MockFunction] { "calls": Array [ Array [ - " Deprecation Warning: - - Option "extraGlobals" was replaced by "sandboxInjectedGlobals". - - Please update your configuration. - - Configuration Documentation: - https://jestjs.io/docs/configuration -", + " Deprecation Warning: + + Option "extraGlobals" was replaced by "sandboxInjectedGlobals". + + Please update your configuration. + + Configuration Documentation: + https://jestjs.io/docs/configuration +", ], ], "results": Array [ @@ -165,15 +165,15 @@ exports[`logs a deprecation warning when 'moduleLoader' option is passed 1`] = ` [MockFunction] { "calls": Array [ Array [ - " Deprecation Warning: - - Option "moduleLoader" was replaced by "runtime". - - Please update your configuration. - - Configuration Documentation: - https://jestjs.io/docs/configuration -", + " Deprecation Warning: + + Option "moduleLoader" was replaced by "runtime". + + Please update your configuration. + + Configuration Documentation: + https://jestjs.io/docs/configuration +", ], ], "results": Array [ @@ -189,15 +189,15 @@ exports[`logs a deprecation warning when 'preprocessorIgnorePatterns' option is [MockFunction] { "calls": Array [ Array [ - " Deprecation Warning: - - Option "preprocessorIgnorePatterns" was replaced by "transformIgnorePatterns", which support multiple preprocessors. - - Please update your configuration. - - Configuration Documentation: - https://jestjs.io/docs/configuration -", + " Deprecation Warning: + + Option "preprocessorIgnorePatterns" was replaced by "transformIgnorePatterns", which support multiple preprocessors. + + Please update your configuration. + + Configuration Documentation: + https://jestjs.io/docs/configuration +", ], ], "results": Array [ @@ -213,15 +213,15 @@ exports[`logs a deprecation warning when 'scriptPreprocessor' option is passed 1 [MockFunction] { "calls": Array [ Array [ - " Deprecation Warning: - - Option "scriptPreprocessor" was replaced by "transform", which support multiple preprocessors. - - Please update your configuration. - - Configuration Documentation: - https://jestjs.io/docs/configuration -", + " Deprecation Warning: + + Option "scriptPreprocessor" was replaced by "transform", which support multiple preprocessors. + + Please update your configuration. + + Configuration Documentation: + https://jestjs.io/docs/configuration +", ], ], "results": Array [ @@ -237,15 +237,15 @@ exports[`logs a deprecation warning when 'setupTestFrameworkScriptFile' option i [MockFunction] { "calls": Array [ Array [ - " Deprecation Warning: - - Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths. - - Please update your configuration. - - Configuration Documentation: - https://jestjs.io/docs/configuration -", + " Deprecation Warning: + + Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths. + + Please update your configuration. + + Configuration Documentation: + https://jestjs.io/docs/configuration +", ], ], "results": Array [ @@ -261,16 +261,16 @@ exports[`logs a deprecation warning when 'testPathDirs' option is passed 1`] = ` [MockFunction] { "calls": Array [ Array [ - " Deprecation Warning: - - Option "testPathDirs" was replaced by "roots". - - Please update your configuration. - - - Configuration Documentation: - https://jestjs.io/docs/configuration -", + " Deprecation Warning: + + Option "testPathDirs" was replaced by "roots". + + Please update your configuration. + + + Configuration Documentation: + https://jestjs.io/docs/configuration +", ], ], "results": Array [ @@ -286,15 +286,15 @@ exports[`logs a deprecation warning when 'testURL' option is passed 1`] = ` [MockFunction] { "calls": Array [ Array [ - " Deprecation Warning: - - Option "testURL" was replaced by passing the URL via "testEnvironmentOptions.url". - - Please update your configuration. - - Configuration Documentation: - https://jestjs.io/docs/configuration -", + " Deprecation Warning: + + Option "testURL" was replaced by passing the URL via "testEnvironmentOptions.url". + + Please update your configuration. + + Configuration Documentation: + https://jestjs.io/docs/configuration +", ], ], "results": Array [ @@ -310,15 +310,15 @@ exports[`logs a deprecation warning when 'timers' option is passed 1`] = ` [MockFunction] { "calls": Array [ Array [ - " Deprecation Warning: - - Option "timers" was replaced by "fakeTimers". - - Please update your configuration. - - Configuration Documentation: - https://jestjs.io/docs/configuration -", + " Deprecation Warning: + + Option "timers" was replaced by "fakeTimers". + + Please update your configuration. + + Configuration Documentation: + https://jestjs.io/docs/configuration +", ], ], "results": Array [ @@ -331,153 +331,153 @@ exports[`logs a deprecation warning when 'timers' option is passed 1`] = ` `; exports[`preset throws when module was found but no "jest-preset.js" or "jest-preset.json" files 1`] = ` -"Validation Error: - - Module exist-but-no-jest-preset should have "jest-preset.js" or "jest-preset.json" file at the root. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Module exist-but-no-jest-preset should have "jest-preset.js" or "jest-preset.json" file at the root. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`preset throws when preset not found 1`] = ` -"Validation Error: - - Preset doesnt-exist not found. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Preset doesnt-exist not found. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`reporters throws an error if first value in the tuple is not a string 1`] = ` -"Reporter Validation Error: - - Unexpected value for Path at index 0 of reporter at index 0 - Expected: - string - Got: - number - Reporter configuration: - [ - 123 - ] - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Reporter Validation Error: + + Unexpected value for Path at index 0 of reporter at index 0 + Expected: + string + Got: + number + Reporter configuration: + [ + 123 + ] + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`reporters throws an error if second value in the tuple is not an object 1`] = ` -"Reporter Validation Error: - - Unexpected value for Reporter Configuration at index 1 of reporter at index 0 - Expected: - object - Got: - boolean - Reporter configuration: - [ - "some-reporter", - true - ] - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Reporter Validation Error: + + Unexpected value for Reporter Configuration at index 1 of reporter at index 0 + Expected: + object + Got: + boolean + Reporter configuration: + [ + "some-reporter", + true + ] + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`reporters throws an error if second value is missing in the tuple 1`] = ` -"Reporter Validation Error: - - Unexpected value for Reporter Configuration at index 1 of reporter at index 0 - Expected: - object - Got: - undefined - Reporter configuration: - [ - "some-reporter" - ] - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Reporter Validation Error: + + Unexpected value for Reporter Configuration at index 1 of reporter at index 0 + Expected: + object + Got: + undefined + Reporter configuration: + [ + "some-reporter" + ] + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`reporters throws an error if value is neither string nor array 1`] = ` -"Reporter Validation Error: - - Reporter at index 0 must be of type: - array or string - but instead received: - number - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Reporter Validation Error: + + Reporter at index 0 must be of type: + array or string + but instead received: + number + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`rootDir throws if the options is missing a rootDir property 1`] = ` -"Validation Error: - - Configuration option rootDir must be specified. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Configuration option rootDir must be specified. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`runner throw error when a runner is not found 1`] = ` -"Validation Error: - - Jest Runner missing-runner cannot be found. Make sure the runner configuration option points to an existing node module. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Jest Runner missing-runner cannot be found. Make sure the runner configuration option points to an existing node module. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`testEnvironment throws on invalid environment names 1`] = ` -"Validation Error: - - Test environment phantom cannot be found. Make sure the testEnvironment configuration option points to an existing node module. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Test environment phantom cannot be found. Make sure the testEnvironment configuration option points to an existing node module. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`testMatch throws if testRegex and testMatch are both specified 1`] = ` -"Validation Error: - - Configuration options testMatch and testRegex cannot be used together. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Configuration options testMatch and testRegex cannot be used together. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; -exports[`testPathPattern ignores invalid regular expressions and logs a warning 1`] = `" Invalid testPattern a( supplied. Running all tests instead."`; +exports[`testPathPattern ignores invalid regular expressions and logs a warning 1`] = `" Invalid testPattern a( supplied. Running all tests instead."`; -exports[`testPathPattern --testPathPattern ignores invalid regular expressions and logs a warning 1`] = `" Invalid testPattern a( supplied. Running all tests instead."`; +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: - - Option "testTimeout" must be a natural number. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Option "testTimeout" must be a natural number. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; exports[`watchPlugins throw error when a watch plugin is not found 1`] = ` -"Validation Error: - - Watch plugin missing-plugin cannot be found. Make sure the watchPlugins configuration option points to an existing node module. - - Configuration Documentation: - https://jestjs.io/docs/configuration -" +"Validation Error: + + Watch plugin missing-plugin cannot be found. Make sure the watchPlugins configuration option points to an existing node module. + + Configuration Documentation: + https://jestjs.io/docs/configuration +" `; 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 02bb55489ba1..4a5db3df59ea 100644 --- a/packages/jest-core/src/__tests__/__snapshots__/SnapshotInteractiveMode.test.js.snap +++ b/packages/jest-core/src/__tests__/__snapshots__/SnapshotInteractiveMode.test.js.snap @@ -4,26 +4,26 @@ exports[`SnapshotInteractiveMode skip 1 test, then quit 1`] = ` " -Interactive Snapshot Progress - › 1 snapshot remaining - -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Interactive Snapshot Progress + › 1 snapshot remaining + +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; exports[`SnapshotInteractiveMode skip 1 test, then quit 2`] = ` " -Interactive Snapshot Result - › 1 snapshot reviewed, 1 snapshot skipped +Interactive Snapshot Result + › 1 snapshot reviewed, 1 snapshot skipped -Watch Usage - › Press r to restart Interactive Snapshot Mode. - › Press q to quit Interactive Snapshot Mode. +Watch Usage + › Press r to restart Interactive Snapshot Mode. + › Press q to quit Interactive Snapshot Mode. " `; @@ -31,26 +31,26 @@ exports[`SnapshotInteractiveMode skip 1 test, then restart 1`] = ` " -Interactive Snapshot Progress - › 1 snapshot remaining +Interactive Snapshot Progress + › 1 snapshot remaining -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; exports[`SnapshotInteractiveMode skip 1 test, then restart 2`] = ` " -Interactive Snapshot Result - › 1 snapshot reviewed, 1 snapshot skipped +Interactive Snapshot Result + › 1 snapshot reviewed, 1 snapshot skipped -Watch Usage - › Press r to restart Interactive Snapshot Mode. - › Press q to quit Interactive Snapshot Mode. +Watch Usage + › Press r to restart Interactive Snapshot Mode. + › Press q to quit Interactive Snapshot Mode. " `; @@ -58,14 +58,14 @@ exports[`SnapshotInteractiveMode skip 1 test, then restart 3`] = ` " -Interactive Snapshot Progress - › 1 snapshot remaining +Interactive Snapshot Progress + › 1 snapshot remaining -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; @@ -73,14 +73,14 @@ exports[`SnapshotInteractiveMode skip 1 test, update 1 test, then finish and res " -Interactive Snapshot Progress - › 2 snapshots remaining +Interactive Snapshot Progress + › 2 snapshots remaining -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; @@ -88,26 +88,26 @@ exports[`SnapshotInteractiveMode skip 1 test, update 1 test, then finish and res " -Interactive Snapshot Progress - › 1 snapshot remaining, 1 snapshot skipped +Interactive Snapshot Progress + › 1 snapshot remaining, 1 snapshot skipped -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; exports[`SnapshotInteractiveMode skip 1 test, update 1 test, then finish and restart 3`] = ` " -Interactive Snapshot Result - › 2 snapshots reviewed, 1 snapshot updated, 1 snapshot skipped +Interactive Snapshot Result + › 2 snapshots reviewed, 1 snapshot updated, 1 snapshot skipped -Watch Usage - › Press r to restart Interactive Snapshot Mode. - › Press q to quit Interactive Snapshot Mode. +Watch Usage + › Press r to restart Interactive Snapshot Mode. + › Press q to quit Interactive Snapshot Mode. " `; @@ -115,14 +115,14 @@ exports[`SnapshotInteractiveMode skip 1 test, update 1 test, then finish and res " -Interactive Snapshot Progress - › 1 snapshot remaining +Interactive Snapshot Progress + › 1 snapshot remaining -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; @@ -130,14 +130,14 @@ exports[`SnapshotInteractiveMode skip 2 tests, then finish and restart 1`] = ` " -Interactive Snapshot Progress - › 2 snapshots remaining +Interactive Snapshot Progress + › 2 snapshots remaining -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; @@ -145,26 +145,26 @@ exports[`SnapshotInteractiveMode skip 2 tests, then finish and restart 2`] = ` " -Interactive Snapshot Progress - › 1 snapshot remaining, 1 snapshot skipped +Interactive Snapshot Progress + › 1 snapshot remaining, 1 snapshot skipped -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; exports[`SnapshotInteractiveMode skip 2 tests, then finish and restart 3`] = ` " -Interactive Snapshot Result - › 2 snapshots reviewed, 2 snapshots skipped +Interactive Snapshot Result + › 2 snapshots reviewed, 2 snapshots skipped -Watch Usage - › Press r to restart Interactive Snapshot Mode. - › Press q to quit Interactive Snapshot Mode. +Watch Usage + › Press r to restart Interactive Snapshot Mode. + › Press q to quit Interactive Snapshot Mode. " `; @@ -172,14 +172,14 @@ exports[`SnapshotInteractiveMode skip 2 tests, then finish and restart 4`] = ` " -Interactive Snapshot Progress - › 2 snapshots remaining +Interactive Snapshot Progress + › 2 snapshots remaining -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; @@ -187,14 +187,14 @@ exports[`SnapshotInteractiveMode update 1 test, skip 1 test, then finish and res " -Interactive Snapshot Progress - › 2 snapshots remaining +Interactive Snapshot Progress + › 2 snapshots remaining -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; @@ -202,26 +202,26 @@ exports[`SnapshotInteractiveMode update 1 test, skip 1 test, then finish and res " -Interactive Snapshot Progress - › 1 snapshot remaining, 1 snapshot updated +Interactive Snapshot Progress + › 1 snapshot remaining, 1 snapshot updated -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; exports[`SnapshotInteractiveMode update 1 test, skip 1 test, then finish and restart 3`] = ` " -Interactive Snapshot Result - › 2 snapshots reviewed, 1 snapshot updated, 1 snapshot skipped +Interactive Snapshot Result + › 2 snapshots reviewed, 1 snapshot updated, 1 snapshot skipped -Watch Usage - › Press r to restart Interactive Snapshot Mode. - › Press q to quit Interactive Snapshot Mode. +Watch Usage + › Press r to restart Interactive Snapshot Mode. + › Press q to quit Interactive Snapshot Mode. " `; @@ -229,14 +229,14 @@ exports[`SnapshotInteractiveMode update 1 test, skip 1 test, then finish and res " -Interactive Snapshot Progress - › 1 snapshot remaining +Interactive Snapshot Progress + › 1 snapshot remaining -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; @@ -244,25 +244,25 @@ exports[`SnapshotInteractiveMode update 1 test, then finish and return 1`] = ` " -Interactive Snapshot Progress - › 1 snapshot remaining +Interactive Snapshot Progress + › 1 snapshot remaining -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; exports[`SnapshotInteractiveMode update 1 test, then finish and return 2`] = ` " -Interactive Snapshot Result - › 1 snapshot reviewed, 1 snapshot updated +Interactive Snapshot Result + › 1 snapshot reviewed, 1 snapshot updated -Watch Usage - › Press Enter to return to watch mode. +Watch Usage + › Press Enter to return to watch mode. " `; @@ -270,14 +270,14 @@ exports[`SnapshotInteractiveMode update 2 tests, then finish and return 1`] = ` " -Interactive Snapshot Progress - › 2 snapshots remaining +Interactive Snapshot Progress + › 2 snapshots remaining -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; @@ -285,24 +285,24 @@ exports[`SnapshotInteractiveMode update 2 tests, then finish and return 2`] = ` " -Interactive Snapshot Progress - › 1 snapshot remaining, 1 snapshot updated +Interactive Snapshot Progress + › 1 snapshot remaining, 1 snapshot updated -Watch Usage - › Press u to update failing snapshots for this test. - › Press s to skip the current test. - › Press q to quit Interactive Snapshot Mode. - › Press Enter to trigger a test run. +Watch Usage + › Press u to update failing snapshots for this test. + › Press s to skip the current test. + › Press q to quit Interactive Snapshot Mode. + › Press Enter to trigger a test run. " `; exports[`SnapshotInteractiveMode update 2 tests, then finish and return 3`] = ` " -Interactive Snapshot Result - › 2 snapshots reviewed, 2 snapshots updated +Interactive Snapshot Result + › 2 snapshots reviewed, 2 snapshots updated -Watch Usage - › Press Enter to return to watch mode. +Watch Usage + › Press Enter to return to watch mode. " `; diff --git a/packages/jest-core/src/__tests__/__snapshots__/getNoTestsFoundMessage.test.ts.snap b/packages/jest-core/src/__tests__/__snapshots__/getNoTestsFoundMessage.test.ts.snap index bc5a0e7d3645..059aa966f758 100644 --- a/packages/jest-core/src/__tests__/__snapshots__/getNoTestsFoundMessage.test.ts.snap +++ b/packages/jest-core/src/__tests__/__snapshots__/getNoTestsFoundMessage.test.ts.snap @@ -3,61 +3,61 @@ exports[`getNoTestsFoundMessage returns correct message when monitoring only changed 1`] = ` Object { "exitWith0": true, - "message": "No tests found related to files changed since last commit. -Run Jest without \`-o\` or with \`--all\` to run all tests.", + "message": "No tests found related to files changed since last commit. +Run Jest without \`-o\` or with \`--all\` to run all tests.", } `; exports[`getNoTestsFoundMessage returns correct message when monitoring only failures 1`] = ` Object { "exitWith0": false, - "message": "No failed test found. -Run Jest without \`--onlyFailures\` or with \`--all\` to run all tests.", + "message": "No failed test found. +Run Jest without \`--onlyFailures\` or with \`--all\` to run all tests.", } `; exports[`getNoTestsFoundMessage returns correct message with findRelatedTests 1`] = ` Object { "exitWith0": false, - "message": "No tests found, exiting with code 1 + "message": "No tests found, exiting with code 1 Run with \`--passWithNoTests\` to exit with code 0 -In /root/dir +In /root/dir 0 files checked across 0 projects. Run with \`--verbose\` for more details. -Pattern: /path/pattern - 0 matches", +Pattern: /path/pattern - 0 matches", } `; exports[`getNoTestsFoundMessage returns correct message with findRelatedTests 2`] = ` Object { "exitWith0": true, - "message": "No tests found, exiting with code 0", + "message": "No tests found, exiting with code 0", } `; exports[`getNoTestsFoundMessage returns correct message with passWithNoTests 1`] = ` Object { "exitWith0": true, - "message": "No tests found, exiting with code 0", + "message": "No tests found, exiting with code 0", } `; exports[`getNoTestsFoundMessage returns correct message with verbose option 1`] = ` Object { "exitWith0": false, - "message": "No tests found, exiting with code 1 + "message": "No tests found, exiting with code 1 Run with \`--passWithNoTests\` to exit with code 0 -Pattern: /path/pattern - 0 matches", +Pattern: /path/pattern - 0 matches", } `; exports[`getNoTestsFoundMessage returns correct message without options 1`] = ` Object { "exitWith0": false, - "message": "No tests found, exiting with code 1 + "message": "No tests found, exiting with code 1 Run with \`--passWithNoTests\` to exit with code 0 -In /root/dir +In /root/dir 0 files checked across 0 projects. Run with \`--verbose\` for more details. -Pattern: /path/pattern - 0 matches", +Pattern: /path/pattern - 0 matches", } `; diff --git a/packages/jest-core/src/__tests__/__snapshots__/watchFilenamePatternMode.test.js.snap b/packages/jest-core/src/__tests__/__snapshots__/watchFilenamePatternMode.test.js.snap index 2dd55f418bed..9e5b82d69a78 100644 --- a/packages/jest-core/src/__tests__/__snapshots__/watchFilenamePatternMode.test.js.snap +++ b/packages/jest-core/src/__tests__/__snapshots__/watchFilenamePatternMode.test.js.snap @@ -102,9 +102,9 @@ exports[`Watch mode flows Pressing "c" clears the filters 1`] = ` " -Pattern Mode Usage - › Press Esc to exit pattern mode. - › Press Enter to filter by a filenames regex pattern. +Pattern Mode Usage + › Press Esc to exit pattern mode. + › Press Enter to filter by a filenames regex pattern. diff --git a/packages/jest-each/src/__tests__/__snapshots__/template.test.ts.snap b/packages/jest-each/src/__tests__/__snapshots__/template.test.ts.snap index bf551eeec425..1bea0a362294 100644 --- a/packages/jest-each/src/__tests__/__snapshots__/template.test.ts.snap +++ b/packages/jest-each/src/__tests__/__snapshots__/template.test.ts.snap @@ -8,66 +8,66 @@ exports[`jest-each .describe throws an error when called with an empty string 1` exports[`jest-each .describe throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .describe throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .describe throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .describe throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .describe throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .describe throws error when there are no arguments for given headings 1`] = ` @@ -83,66 +83,66 @@ exports[`jest-each .describe.only throws an error when called with an empty stri exports[`jest-each .describe.only throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .describe.only throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .describe.only throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .describe.only throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .describe.only throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .describe.only throws error when there are no arguments for given headings 1`] = ` @@ -158,66 +158,66 @@ exports[`jest-each .fdescribe throws an error when called with an empty string 1 exports[`jest-each .fdescribe throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .fdescribe throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .fdescribe throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .fdescribe throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .fdescribe throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .fdescribe throws error when there are no arguments for given headings 1`] = ` @@ -233,66 +233,66 @@ exports[`jest-each .fit throws an error when called with an empty string 1`] = ` exports[`jest-each .fit throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .fit throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .fit throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .fit throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .fit throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .fit throws error when there are no arguments for given headings 1`] = ` @@ -308,66 +308,66 @@ exports[`jest-each .it throws an error when called with an empty string 1`] = ` exports[`jest-each .it throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .it throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .it throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .it throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .it throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .it throws error when there are no arguments for given headings 1`] = ` @@ -383,66 +383,66 @@ exports[`jest-each .it.only throws an error when called with an empty string 1`] exports[`jest-each .it.only throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .it.only throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .it.only throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .it.only throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .it.only throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .it.only throws error when there are no arguments for given headings 1`] = ` @@ -458,66 +458,66 @@ exports[`jest-each .test throws an error when called with an empty string 1`] = exports[`jest-each .test throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .test throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .test throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .test throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .test throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .test throws error when there are no arguments for given headings 1`] = ` @@ -533,66 +533,66 @@ exports[`jest-each .test.concurrent throws an error when called with an empty st exports[`jest-each .test.concurrent throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .test.concurrent throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .test.concurrent throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .test.concurrent throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .test.concurrent throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .test.concurrent throws error when there are no arguments for given headings 1`] = ` @@ -608,66 +608,66 @@ exports[`jest-each .test.concurrent.only throws an error when called with an emp exports[`jest-each .test.concurrent.only throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .test.concurrent.only throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .test.concurrent.only throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .test.concurrent.only throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .test.concurrent.only throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .test.concurrent.only throws error when there are no arguments for given headings 1`] = ` @@ -683,66 +683,66 @@ exports[`jest-each .test.concurrent.skip throws an error when called with an emp exports[`jest-each .test.concurrent.skip throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .test.concurrent.skip throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .test.concurrent.skip throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .test.concurrent.skip throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .test.concurrent.skip throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .test.concurrent.skip throws error when there are no arguments for given headings 1`] = ` @@ -758,66 +758,66 @@ exports[`jest-each .test.only throws an error when called with an empty string 1 exports[`jest-each .test.only throws error when there are additional words in first column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a is the left | b | expected - "" +" + a is the left | b | expected + "" `; exports[`jest-each .test.only throws error when there are additional words in last column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b | expected value - "" +" + a | b | expected value + "" `; exports[`jest-each .test.only throws error when there are additional words in second column heading 1`] = ` "Table headings do not conform to expected format: -heading1 | headingN +heading1 | headingN Received: -" - a | b is the right | expected - "" +" + a | b is the right | expected + "" `; exports[`jest-each .test.only throws error when there are fewer arguments than headings over multiple rows 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, - 1, - 1, - 1, -] +Array [ + 0, + 1, + 1, + 1, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .test.only throws error when there are fewer arguments than headings when given one row 1`] = ` "Not enough arguments supplied for given headings: -a | b | expected +a | b | expected Received: -Array [ - 0, - 1, -] +Array [ + 0, + 1, +] -Missing 1 argument" +Missing 1 argument" `; exports[`jest-each .test.only throws error when there are no arguments for given headings 1`] = ` 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 77d06c568353..0add9fd94e0c 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 @@ -1,47 +1,47 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`.formatExecError() 1`] = ` -" ● Test suite failed to run +" ● Test suite failed to run Whoops! " `; exports[`codeframe 1`] = ` -" ● Test suite failed to run +" ● Test suite failed to run Whoops! - > 1 | throw new Error("Whoops!"); - | ^ + > 1 | throw new Error("Whoops!"); + | ^ - at Object. (file.js:1:7) + at Object. (file.js:1:7) " `; exports[`formatStackTrace does not print code frame when noCodeFrame = true 1`] = ` " - at Object. (file.js:1:7) + at Object. (file.js:1:7) " `; exports[`formatStackTrace does not print codeframe when noStackTrace = true 1`] = ` " - at Object. (file.js:1:7) + at Object. (file.js:1:7) " `; exports[`formatStackTrace prints code frame and stacktrace 1`] = ` " - > 1 | throw new Error("Whoops!"); - | ^ + > 1 | throw new Error("Whoops!"); + | ^ - at Object. (file.js:1:7) + at Object. (file.js:1:7) " `; exports[`formatStackTrace should strip node internals 1`] = ` -" Unix test +" Unix test Expected value to be of type: @@ -50,55 +50,55 @@ exports[`formatStackTrace should strip node internals 1`] = ` "" type: "string" - - at Object.it (__tests__/test.js:8:14) + + at Object.it (__tests__/test.js:8:14) " `; exports[`no codeframe 1`] = ` -" ● Test suite failed to run +" ● Test suite failed to run Whoops! - at Object. (file.js:1:7) + at Object. (file.js:1:7) " `; exports[`no stack 1`] = ` -" ● Test suite failed to run +" ● Test suite failed to run Whoops! " `; 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 ' + - | ^ - 21 | 'memo(forwardRef(...)).', - 22 | ); - 23 | } else if (typeof render !== 'function') { + + 18 | false, + 19 | 'forwardRef requires a render function but received a \`memo\` ' + > 20 | 'component. Instead of forwardRef(memo(...)), use ' + + | ^ + 21 | 'memo(forwardRef(...)).', + 22 | ); + 23 | } else if (typeof render !== 'function') { " `; 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: @@ -107,8 +107,8 @@ 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-reporters/src/__tests__/__snapshots__/SummaryReporter.test.js.snap b/packages/jest-reporters/src/__tests__/__snapshots__/SummaryReporter.test.js.snap index 93092c94bb4c..42e5e5366851 100644 --- a/packages/jest-reporters/src/__tests__/__snapshots__/SummaryReporter.test.js.snap +++ b/packages/jest-reporters/src/__tests__/__snapshots__/SummaryReporter.test.js.snap @@ -1,61 +1,61 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`snapshots all have results (after update) 1`] = ` -"Snapshot Summary - › 1 snapshot written from 1 test suite. - › 1 snapshot failed from 1 test suite. Inspect your code changes or run \`yarn test -u\` to update them. - › 1 snapshot updated from 1 test suite. - › 1 snapshot file removed from 1 test suite. - › 1 snapshot removed from 1 test suite. - ↳ ../path/to/suite_one +"Snapshot Summary + › 1 snapshot written from 1 test suite. + › 1 snapshot failed from 1 test suite. Inspect your code changes or run \`yarn test -u\` to update them. + › 1 snapshot updated from 1 test suite. + › 1 snapshot file removed from 1 test suite. + › 1 snapshot removed from 1 test suite. + ↳ ../path/to/suite_one • unchecked snapshot 1 -Test Suites: 1 failed, 1 total -Tests: 1 failed, 1 total -Snapshots: 1 failed, 1 removed, 1 file removed, 1 updated, 1 written, 2 passed, 2 total -Time: 0.01 s -Ran all test suites. +Test Suites: 1 failed, 1 total +Tests: 1 failed, 1 total +Snapshots: 1 failed, 1 removed, 1 file removed, 1 updated, 1 written, 2 passed, 2 total +Time: 0.01 s +Ran all test suites. " `; exports[`snapshots all have results (no update) 1`] = ` -"Snapshot Summary - › 1 snapshot written from 1 test suite. - › 1 snapshot failed from 1 test suite. Inspect your code changes or run \`yarn test -u\` to update them. - › 1 snapshot updated from 1 test suite. - › 1 snapshot file obsolete from 1 test suite. To remove it, run \`yarn test -u\`. - › 1 snapshot obsolete from 1 test suite. To remove it, run \`yarn test -u\`. - ↳ ../path/to/suite_one +"Snapshot Summary + › 1 snapshot written from 1 test suite. + › 1 snapshot failed from 1 test suite. Inspect your code changes or run \`yarn test -u\` to update them. + › 1 snapshot updated from 1 test suite. + › 1 snapshot file obsolete from 1 test suite. To remove it, run \`yarn test -u\`. + › 1 snapshot obsolete from 1 test suite. To remove it, run \`yarn test -u\`. + ↳ ../path/to/suite_one • unchecked snapshot 1 -Test Suites: 1 failed, 1 total -Tests: 1 failed, 1 total -Snapshots: 1 failed, 1 obsolete, 1 file obsolete, 1 updated, 1 written, 2 passed, 2 total -Time: 0.01 s -Ran all test suites. +Test Suites: 1 failed, 1 total +Tests: 1 failed, 1 total +Snapshots: 1 failed, 1 obsolete, 1 file obsolete, 1 updated, 1 written, 2 passed, 2 total +Time: 0.01 s +Ran all test suites. " `; exports[`snapshots needs update with npm test 1`] = ` -"Snapshot Summary - › 2 snapshots failed from 1 test suite. Inspect your code changes or run \`npm test -- -u\` to update them. - -Test Suites: 1 failed, 1 total -Tests: 1 failed, 1 total -Snapshots: 2 failed, 2 total -Time: 0.01 s -Ran all test suites. +"Snapshot Summary + › 2 snapshots failed from 1 test suite. Inspect your code changes or run \`npm test -- -u\` to update them. + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 1 total +Snapshots: 2 failed, 2 total +Time: 0.01 s +Ran all test suites. " `; exports[`snapshots needs update with yarn test 1`] = ` -"Snapshot Summary - › 2 snapshots failed from 1 test suite. Inspect your code changes or run \`yarn test -u\` to update them. - -Test Suites: 1 failed, 1 total -Tests: 1 failed, 1 total -Snapshots: 2 failed, 2 total -Time: 0.01 s -Ran all test suites. +"Snapshot Summary + › 2 snapshots failed from 1 test suite. Inspect your code changes or run \`yarn test -u\` to update them. + +Test Suites: 1 failed, 1 total +Tests: 1 failed, 1 total +Snapshots: 2 failed, 2 total +Time: 0.01 s +Ran all test suites. " `; diff --git a/packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotStatus.test.js.snap b/packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotStatus.test.js.snap index 03b8fed6bf44..9694724453da 100644 --- a/packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotStatus.test.js.snap +++ b/packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotStatus.test.js.snap @@ -2,23 +2,23 @@ exports[`Retrieves the snapshot status 1`] = ` Array [ - " › 1 snapshot written.", - " › 1 snapshot updated.", - " › 1 snapshot failed.", - " › 1 snapshot obsolete.", + " › 1 snapshot written.", + " › 1 snapshot updated.", + " › 1 snapshot failed.", + " › 1 snapshot obsolete.", " • test suite with unchecked snapshot", ] `; exports[`Retrieves the snapshot status after a snapshot update 1`] = ` Array [ - " › 2 snapshots written.", - " › 2 snapshots updated.", - " › 2 snapshots failed.", - " › 2 snapshots removed.", + " › 2 snapshots written.", + " › 2 snapshots updated.", + " › 2 snapshots failed.", + " › 2 snapshots removed.", " • first test suite with unchecked snapshot", " • second test suite with unchecked snapshot", - " › snapshot file removed.", + " › snapshot file removed.", ] `; diff --git a/packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotSummary.test.js.snap b/packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotSummary.test.js.snap index 6872f4949453..136b8cdc8013 100644 --- a/packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotSummary.test.js.snap +++ b/packages/jest-reporters/src/__tests__/__snapshots__/getSnapshotSummary.test.js.snap @@ -1,38 +1,38 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`creates a snapshot summary 1`] = ` -"Snapshot Summary - › 1 snapshot written from 1 test suite. - › 1 snapshot failed from 1 test suite. Inspect your code changes or press --u to update them. - › 1 snapshot updated from 1 test suite. - › 1 snapshot file obsolete from 1 test suite. To remove it, press --u. - › 1 snapshot obsolete from 1 test suite. To remove it, press --u. - ↳ ../path/to/suite_one +"Snapshot Summary + › 1 snapshot written from 1 test suite. + › 1 snapshot failed from 1 test suite. Inspect your code changes or press --u to update them. + › 1 snapshot updated from 1 test suite. + › 1 snapshot file obsolete from 1 test suite. To remove it, press --u. + › 1 snapshot obsolete from 1 test suite. To remove it, press --u. + ↳ ../path/to/suite_one • unchecked snapshot 1" `; exports[`creates a snapshot summary after an update 1`] = ` -"Snapshot Summary - › 1 snapshot written from 1 test suite. - › 1 snapshot failed from 1 test suite. Inspect your code changes or press --u to update them. - › 1 snapshot updated from 1 test suite. - › 1 snapshot file removed from 1 test suite. - › 1 snapshot removed from 1 test suite. - ↳ ../path/to/suite_one +"Snapshot Summary + › 1 snapshot written from 1 test suite. + › 1 snapshot failed from 1 test suite. Inspect your code changes or press --u to update them. + › 1 snapshot updated from 1 test suite. + › 1 snapshot file removed from 1 test suite. + › 1 snapshot removed from 1 test suite. + ↳ ../path/to/suite_one • unchecked snapshot 1" `; exports[`creates a snapshot summary with multiple snapshot being written/updated 1`] = ` -"Snapshot Summary - › 2 snapshots written from 2 test suites. - › 2 snapshots failed from 2 test suites. Inspect your code changes or press --u to update them. - › 2 snapshots updated from 2 test suites. - › 2 snapshot files obsolete from 2 test suites. To remove them all, press --u. - › 2 snapshots obsolete from 2 test suites. To remove them all, press --u. - ↳ ../path/to/suite_one +"Snapshot Summary + › 2 snapshots written from 2 test suites. + › 2 snapshots failed from 2 test suites. Inspect your code changes or press --u to update them. + › 2 snapshots updated from 2 test suites. + › 2 snapshot files obsolete from 2 test suites. To remove them all, press --u. + › 2 snapshots obsolete from 2 test suites. To remove them all, press --u. + ↳ ../path/to/suite_one • unchecked snapshot 1 - ↳ ../path/to/suite_two + ↳ ../path/to/suite_two • unchecked snapshot 2" `; -exports[`returns nothing if there are no updates 1`] = `"Snapshot Summary"`; +exports[`returns nothing if there are no updates 1`] = `"Snapshot Summary"`; diff --git a/packages/jest-reporters/src/__tests__/__snapshots__/utils.test.ts.snap b/packages/jest-reporters/src/__tests__/__snapshots__/utils.test.ts.snap index 5196a773223b..345407701787 100644 --- a/packages/jest-reporters/src/__tests__/__snapshots__/utils.test.ts.snap +++ b/packages/jest-reporters/src/__tests__/__snapshots__/utils.test.ts.snap @@ -1,20 +1,20 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`printDisplayName should correctly print the displayName when color and name are valid values 1`] = `" hello "`; +exports[`printDisplayName should correctly print the displayName when color and name are valid values 1`] = `" hello "`; -exports[`printDisplayName should default displayName color to white when color is not a valid value 1`] = `" hello "`; +exports[`printDisplayName should default displayName color to white when color is not a valid value 1`] = `" hello "`; -exports[`printDisplayName should default displayName color to white when displayName is a string 1`] = `" hello "`; +exports[`printDisplayName should default displayName color to white when displayName is a string 1`] = `" hello "`; -exports[`trimAndFormatPath() does not trim anything 1`] = `"1234567890/1234567890/1234.js"`; +exports[`trimAndFormatPath() does not trim anything 1`] = `"1234567890/1234567890/1234.js"`; -exports[`trimAndFormatPath() split at the path.sep index 1`] = `".../1234.js"`; +exports[`trimAndFormatPath() split at the path.sep index 1`] = `".../1234.js"`; -exports[`trimAndFormatPath() trims dirname (longer line width) 1`] = `"...890/1234567890/1234.js"`; +exports[`trimAndFormatPath() trims dirname (longer line width) 1`] = `"...890/1234567890/1234.js"`; -exports[`trimAndFormatPath() trims dirname 1`] = `"...234567890/1234.js"`; +exports[`trimAndFormatPath() trims dirname 1`] = `"...234567890/1234.js"`; -exports[`trimAndFormatPath() trims dirname and basename 1`] = `"...1234.js"`; +exports[`trimAndFormatPath() trims dirname and basename 1`] = `"...1234.js"`; exports[`wrapAnsiString() returns the string unaltered if given a terminal width of zero 1`] = `"This string shouldn't cause you any trouble"`; @@ -22,8 +22,8 @@ exports[`wrapAnsiString() returns the string unaltered if given a terminal width exports[`wrapAnsiString() wraps a long string containing ansi chars 1`] = ` "abcde red- -bold 12344 -56bcd 123t +bold 12344 +56bcd 123t tttttththt hththththt hththththt @@ -32,7 +32,7 @@ hthththtet etetetette tetetetete tetetestnh -snthsnthss +snthsnthss ot" `; diff --git a/packages/jest-snapshot/src/__tests__/__snapshots__/SnapshotResolver.test.ts.snap b/packages/jest-snapshot/src/__tests__/__snapshots__/SnapshotResolver.test.ts.snap index 99b0240c2bdc..c95e7f006cc1 100644 --- a/packages/jest-snapshot/src/__tests__/__snapshots__/SnapshotResolver.test.ts.snap +++ b/packages/jest-snapshot/src/__tests__/__snapshots__/SnapshotResolver.test.ts.snap @@ -1,18 +1,18 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`malformed custom resolver in project config inconsistent functions throws 1`] = `"Custom snapshot resolver functions must transform paths consistently, i.e. expects resolveTestPath(resolveSnapshotPath('foo/__tests__/bar.test.js')) === foo/__SPECS__/bar.test.js"`; +exports[`malformed custom resolver in project config inconsistent functions throws 1`] = `"Custom snapshot resolver functions must transform paths consistently, i.e. expects resolveTestPath(resolveSnapshotPath('foo/__tests__/bar.test.js')) === foo/__SPECS__/bar.test.js"`; exports[`malformed custom resolver in project config missing resolveSnapshotPath throws 1`] = ` -"Custom snapshot resolver must implement a \`resolveSnapshotPath\` as a function. +"Custom snapshot resolver must implement a \`resolveSnapshotPath\` as a function. Documentation: https://jestjs.io/docs/configuration#snapshotresolver-string" `; exports[`malformed custom resolver in project config missing resolveTestPath throws 1`] = ` -"Custom snapshot resolver must implement a \`resolveTestPath\` as a function. +"Custom snapshot resolver must implement a \`resolveTestPath\` as a function. Documentation: https://jestjs.io/docs/configuration#snapshotresolver-string" `; exports[`malformed custom resolver in project config missing testPathForConsistencyCheck throws 1`] = ` -"Custom snapshot resolver must implement a \`testPathForConsistencyCheck\` as a string. +"Custom snapshot resolver must implement a \`testPathForConsistencyCheck\` as a string. Documentation: https://jestjs.io/docs/configuration#snapshotresolver-string" `; 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 78495749cec3..152ca5e8cd16 100644 --- a/packages/jest-transform/src/__tests__/__snapshots__/ScriptTransformer.test.ts.snap +++ b/packages/jest-transform/src/__tests__/__snapshots__/ScriptTransformer.test.ts.snap @@ -1,12 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ScriptTransformer (in sync mode) throws an error if \`process\` isn't defined 1`] = ` -"● Invalid synchronous transformer module: - "skipped-required-props-preprocessor-only-async" specified in the "transform" object of Jest configuration - must export a \`process\` function. - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid synchronous transformer module: + "skipped-required-props-preprocessor-only-async" specified in the "transform" object of Jest configuration + must export a \`process\` function. + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer in async mode, passes expected transform options to getCacheKey 1`] = ` @@ -137,9 +137,9 @@ exports[`ScriptTransformer in async mode, uses the supplied preprocessor 1`] = ` exports[`ScriptTransformer in async mode, uses the supplied preprocessor 2`] = `"module.exports = "react";"`; exports[`ScriptTransformer in async mode, warns of unparseable inlined source maps from the preprocessor 1`] = ` -"● Invalid source map: - The source map for "/fruits/banana.js" returned by "preprocessor-with-sourcemaps" is invalid. - Proceeding without source mapping for that file." +"● Invalid source map: + The source map for "/fruits/banana.js" returned by "preprocessor-with-sourcemaps" is invalid. + Proceeding without source mapping for that file." `; exports[`ScriptTransformer passes expected transform options to getCacheKey 1`] = ` @@ -357,125 +357,125 @@ exports[`ScriptTransformer passes expected transform options to getCacheKeyAsync `; exports[`ScriptTransformer throws an error if \`process\` doesn't return an object containing \`code\` key with processed string 1`] = ` -"● Invalid return value: - \`process()\` or/and \`processAsync()\` method of code transformer found at - "passthrough-preprocessor" - should return an object or a Promise resolving to an object. The object - must have \`code\` property with a string of processed code. - This error may be caused by a breaking change in Jest 28: - https://jestjs.io/docs/upgrading-to-jest28#transformer - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid return value: + \`process()\` or/and \`processAsync()\` method of code transformer found at + "passthrough-preprocessor" + should return an object or a Promise resolving to an object. The object + must have \`code\` property with a string of processed code. + This error may be caused by a breaking change in Jest 28: + https://jestjs.io/docs/upgrading-to-jest28#transformer + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer throws an error if \`process\` doesn't return an object containing \`code\` key with processed string 2`] = ` -"● Invalid return value: - \`process()\` or/and \`processAsync()\` method of code transformer found at - "passthrough-preprocessor" - should return an object or a Promise resolving to an object. The object - must have \`code\` property with a string of processed code. - This error may be caused by a breaking change in Jest 28: - https://jestjs.io/docs/upgrading-to-jest28#transformer - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid return value: + \`process()\` or/and \`processAsync()\` method of code transformer found at + "passthrough-preprocessor" + should return an object or a Promise resolving to an object. The object + must have \`code\` property with a string of processed code. + This error may be caused by a breaking change in Jest 28: + https://jestjs.io/docs/upgrading-to-jest28#transformer + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer throws an error if \`process\` doesn't return an object containing \`code\` key with processed string 3`] = ` -"● Invalid return value: - \`process()\` or/and \`processAsync()\` method of code transformer found at - "passthrough-preprocessor" - should return an object or a Promise resolving to an object. The object - must have \`code\` property with a string of processed code. - This error may be caused by a breaking change in Jest 28: - https://jestjs.io/docs/upgrading-to-jest28#transformer - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid return value: + \`process()\` or/and \`processAsync()\` method of code transformer found at + "passthrough-preprocessor" + should return an object or a Promise resolving to an object. The object + must have \`code\` property with a string of processed code. + This error may be caused by a breaking change in Jest 28: + https://jestjs.io/docs/upgrading-to-jest28#transformer + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer throws an error if \`process\` doesn't return an object containing \`code\` key with processed string 4`] = ` -"● Invalid return value: - \`process()\` or/and \`processAsync()\` method of code transformer found at - "passthrough-preprocessor" - should return an object or a Promise resolving to an object. The object - must have \`code\` property with a string of processed code. - This error may be caused by a breaking change in Jest 28: - https://jestjs.io/docs/upgrading-to-jest28#transformer - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid return value: + \`process()\` or/and \`processAsync()\` method of code transformer found at + "passthrough-preprocessor" + should return an object or a Promise resolving to an object. The object + must have \`code\` property with a string of processed code. + This error may be caused by a breaking change in Jest 28: + https://jestjs.io/docs/upgrading-to-jest28#transformer + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer throws an error if \`processAsync\` doesn't return a promise of object containing \`code\` key with processed string 1`] = ` -"● Invalid return value: - \`process()\` or/and \`processAsync()\` method of code transformer found at - "passthrough-preprocessor-fruits-banana-js" - should return an object or a Promise resolving to an object. The object - must have \`code\` property with a string of processed code. - This error may be caused by a breaking change in Jest 28: - https://jestjs.io/docs/upgrading-to-jest28#transformer - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid return value: + \`process()\` or/and \`processAsync()\` method of code transformer found at + "passthrough-preprocessor-fruits-banana-js" + should return an object or a Promise resolving to an object. The object + must have \`code\` property with a string of processed code. + This error may be caused by a breaking change in Jest 28: + https://jestjs.io/docs/upgrading-to-jest28#transformer + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer throws an error if \`processAsync\` doesn't return a promise of object containing \`code\` key with processed string 2`] = ` -"● Invalid return value: - \`process()\` or/and \`processAsync()\` method of code transformer found at - "passthrough-preprocessor-fruits-avocado-js" - should return an object or a Promise resolving to an object. The object - must have \`code\` property with a string of processed code. - This error may be caused by a breaking change in Jest 28: - https://jestjs.io/docs/upgrading-to-jest28#transformer - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid return value: + \`process()\` or/and \`processAsync()\` method of code transformer found at + "passthrough-preprocessor-fruits-avocado-js" + should return an object or a Promise resolving to an object. The object + must have \`code\` property with a string of processed code. + This error may be caused by a breaking change in Jest 28: + https://jestjs.io/docs/upgrading-to-jest28#transformer + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer throws an error if \`processAsync\` doesn't return a promise of object containing \`code\` key with processed string 3`] = ` -"● Invalid return value: - \`process()\` or/and \`processAsync()\` method of code transformer found at - "passthrough-preprocessor-fruits-kiwi-js" - should return an object or a Promise resolving to an object. The object - must have \`code\` property with a string of processed code. - This error may be caused by a breaking change in Jest 28: - https://jestjs.io/docs/upgrading-to-jest28#transformer - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid return value: + \`process()\` or/and \`processAsync()\` method of code transformer found at + "passthrough-preprocessor-fruits-kiwi-js" + should return an object or a Promise resolving to an object. The object + must have \`code\` property with a string of processed code. + This error may be caused by a breaking change in Jest 28: + https://jestjs.io/docs/upgrading-to-jest28#transformer + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer throws an error if \`processAsync\` doesn't return a promise of object containing \`code\` key with processed string 4`] = ` -"● Invalid return value: - \`process()\` or/and \`processAsync()\` method of code transformer found at - "passthrough-preprocessor-fruits-grapefruit-js" - should return an object or a Promise resolving to an object. The object - must have \`code\` property with a string of processed code. - This error may be caused by a breaking change in Jest 28: - https://jestjs.io/docs/upgrading-to-jest28#transformer - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid return value: + \`process()\` or/and \`processAsync()\` method of code transformer found at + "passthrough-preprocessor-fruits-grapefruit-js" + should return an object or a Promise resolving to an object. The object + must have \`code\` property with a string of processed code. + This error may be caused by a breaking change in Jest 28: + https://jestjs.io/docs/upgrading-to-jest28#transformer + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer throws an error if createTransformer returns object without \`process\` method 1`] = ` -"● Invalid transformer module: - "skipped-required-create-transformer-props-preprocessor" specified in the "transform" object of Jest configuration - must export a \`process\` or \`processAsync\` or \`createTransformer\` function. - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid transformer module: + "skipped-required-create-transformer-props-preprocessor" specified in the "transform" object of Jest configuration + must export a \`process\` or \`processAsync\` or \`createTransformer\` function. + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer throws an error if neither \`process\` nor \`processAsync\` is defined 1`] = ` -"● Invalid transformer module: - "skipped-required-props-preprocessor" specified in the "transform" object of Jest configuration - must export a \`process\` or \`processAsync\` or \`createTransformer\` function. - Code Transformation Documentation: - https://jestjs.io/docs/code-transformation -" +"● Invalid transformer module: + "skipped-required-props-preprocessor" specified in the "transform" object of Jest configuration + must export a \`process\` or \`processAsync\` or \`createTransformer\` function. + Code Transformation Documentation: + https://jestjs.io/docs/code-transformation +" `; exports[`ScriptTransformer transforms a file async properly 1`] = ` @@ -827,13 +827,13 @@ exports[`ScriptTransformer uses the supplied preprocessor 1`] = ` exports[`ScriptTransformer uses the supplied preprocessor 2`] = `"module.exports = "react";"`; exports[`ScriptTransformer warns of unparseable inlined source maps from the async preprocessor 1`] = ` -"● Invalid source map: - The source map for "/fruits/banana.js" returned by "async-preprocessor-with-sourcemaps" is invalid. - Proceeding without source mapping for that file." +"● Invalid source map: + The source map for "/fruits/banana.js" returned by "async-preprocessor-with-sourcemaps" is invalid. + Proceeding without source mapping for that file." `; exports[`ScriptTransformer warns of unparseable inlined source maps from the preprocessor 1`] = ` -"● Invalid source map: - The source map for "/fruits/banana.js" returned by "preprocessor-with-sourcemaps" is invalid. - Proceeding without source mapping for that file." +"● Invalid source map: + The source map for "/fruits/banana.js" returned by "preprocessor-with-sourcemaps" is invalid. + Proceeding without source mapping for that file." `; 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 d2c63f0366e0..7a367028da12 100644 --- a/packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap +++ b/packages/jest-validate/src/__tests__/__snapshots__/validate.test.ts.snap @@ -1,196 +1,196 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Repeated types within multiple valid examples are coalesced in error report 1`] = ` -" Validation Error: - - Option "foo" must be of type: - string or number - but instead received: - boolean - - Example: - { - "foo": "foo" - } - - or - - { - "foo": "bar" - } - - or - - { - "foo": 2 - } -" +" Validation Error: + + Option "foo" must be of type: + string or number + but instead received: + boolean + + Example: + { + "foo": "foo" + } + + or + + { + "foo": "bar" + } + + or + + { + "foo": 2 + } +" `; exports[`displays warning for deprecated config options 1`] = ` -" Deprecation Warning: - - Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. - - Jest now treats your current configuration as: - { - "transform": {".*": "test"} - } - - Please update your configuration. -" +" Deprecation Warning: + + Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. + + Jest now treats your current configuration as: + { + "transform": {".*": "test"} + } + + Please update your configuration. +" `; exports[`displays warning for unknown config options 1`] = ` -" 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. -" +" 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. +" `; exports[`pretty prints valid config for Array 1`] = ` -" Validation Error: - - Option "coverageReporters" must be of type: - array - but instead received: - object - - Example: - { - "coverageReporters": [ - "json", - "text", - "lcov", - "clover" - ] - } -" +" Validation Error: + + Option "coverageReporters" must be of type: + array + but instead received: + object + + Example: + { + "coverageReporters": [ + "json", + "text", + "lcov", + "clover" + ] + } +" `; exports[`pretty prints valid config for Boolean 1`] = ` -" Validation Error: - - Option "automock" must be of type: - boolean - but instead received: - array - - Example: - { - "automock": false - } -" +" Validation Error: + + Option "automock" must be of type: + boolean + but instead received: + array + + Example: + { + "automock": false + } +" `; exports[`pretty prints valid config for Function 1`] = ` -" Validation Error: - - Option "fn" must be of type: - function - but instead received: - string - - Example: - { - "fn": (_config, _option, _deprecatedOptions) => true - } -" +" Validation Error: + + Option "fn" must be of type: + function + but instead received: + string + + Example: + { + "fn": (_config, _option, _deprecatedOptions) => true + } +" `; exports[`pretty prints valid config for Object 1`] = ` -" Validation Error: - - Option "haste" must be of type: - object - but instead received: - number - - Example: - { - "haste": {} - } -" +" Validation Error: + + Option "haste" must be of type: + object + but instead received: + number + + Example: + { + "haste": {} + } +" `; exports[`pretty prints valid config for String 1`] = ` -" Validation Error: - - Option "preset" must be of type: - string - but instead received: - number - - Example: - { - "preset": "react-native" - } -" +" Validation Error: + + Option "preset" must be of type: + string + but instead received: + number + + Example: + { + "preset": "react-native" + } +" `; exports[`reports errors nicely when failing with multiple valid options 1`] = ` -" Validation Error: - - Option "foo" must be of type: - string or array - but instead received: - number - - Example: - { - "foo": "text" - } - - or - - { - "foo": [ - "text" - ] - } -" +" Validation Error: + + Option "foo" must be of type: + string or array + but instead received: + number + + Example: + { + "foo": "text" + } + + or + + { + "foo": [ + "text" + ] + } +" `; exports[`works with custom deprecations 1`] = ` -"My Custom Deprecation Warning: - - Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. - - Jest now treats your current configuration as: - { - "transform": {".*": "test"} - } - - Please update your configuration. - -My custom comment" +"My Custom Deprecation Warning: + + Option scriptPreprocessor was replaced by transform, which support multiple preprocessors. + + Jest now treats your current configuration as: + { + "transform": {".*": "test"} + } + + Please update your configuration. + +My custom comment" `; exports[`works with custom errors 1`] = ` -"My Custom Error: - - Option "test" must be of type: - array - but instead received: - string - - Example: - { - "test": [ - 1, - 2 - ] - } - -My custom comment" +"My Custom Error: + + Option "test" must be of type: + array + but instead received: + string + + Example: + { + "test": [ + 1, + 2 + ] + } + +My custom comment" `; exports[`works with custom warnings 1`] = ` -"My Custom Warning: - - Unknown option "unknown" with value "string" was found. - This is probably a typing mistake. Fixing it will remove this message. - -My custom comment" +"My Custom Warning: + + Unknown option "unknown" with value "string" was found. + This is probably a typing mistake. Fixing it will remove this message. + +My custom comment" `; 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 361977dc71d3..9531b979a3bc 100644 --- a/packages/jest-validate/src/__tests__/__snapshots__/validateCLIOptions.test.js.snap +++ b/packages/jest-validate/src/__tests__/__snapshots__/validateCLIOptions.test.js.snap @@ -1,42 +1,42 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`does not show suggestion when unrecognized cli param length <= 1 1`] = ` -" Unrecognized CLI Parameter: - - Unrecognized option "l". - - CLI Options Documentation: - https://jestjs.io/docs/cli -" +" Unrecognized CLI Parameter: + + Unrecognized option "l". + + CLI Options Documentation: + https://jestjs.io/docs/cli +" `; exports[`fails for multiple unknown options 1`] = ` -" Unrecognized CLI Parameters: - - Following options were not recognized: - ["jest", "test"] - - CLI Options Documentation: - https://jestjs.io/docs/cli -" +" Unrecognized CLI Parameters: + + Following options were not recognized: + ["jest", "test"] + + CLI Options Documentation: + https://jestjs.io/docs/cli +" `; exports[`fails for unknown option 1`] = ` -" Unrecognized CLI Parameter: - - Unrecognized option "unknown". - - CLI Options Documentation: - https://jestjs.io/docs/cli -" +" Unrecognized CLI Parameter: + + Unrecognized option "unknown". + + CLI Options Documentation: + https://jestjs.io/docs/cli +" `; exports[`shows suggestion when unrecognized cli param length > 1 1`] = ` -" Unrecognized CLI Parameter: - - Unrecognized option "hell". Did you mean "help"? - - CLI Options Documentation: - https://jestjs.io/docs/cli -" +" Unrecognized CLI Parameter: + + Unrecognized option "hell". Did you mean "help"? + + CLI Options Documentation: + https://jestjs.io/docs/cli +" `; diff --git a/packages/jest-watcher/src/lib/__tests__/__snapshots__/formatTestNameByPattern.test.ts.snap b/packages/jest-watcher/src/lib/__tests__/__snapshots__/formatTestNameByPattern.test.ts.snap index 64210a3277f4..c1631170908b 100644 --- a/packages/jest-watcher/src/lib/__tests__/__snapshots__/formatTestNameByPattern.test.ts.snap +++ b/packages/jest-watcher/src/lib/__tests__/__snapshots__/formatTestNameByPattern.test.ts.snap @@ -1,27 +1,27 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 1`] = `"should⏎ name the ⏎function you at..."`; +exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 1`] = `"should⏎ name the ⏎function you at..."`; -exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 2`] = `"should⏎ name the ⏎function you at..."`; +exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 2`] = `"should⏎ name the ⏎function you at..."`; -exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 3`] = `"should⏎ name the ⏎function you at..."`; +exports[`for multiline test name returns test name with highlighted pattern and replaced line breaks 3`] = `"should⏎ name the ⏎function you at..."`; -exports[`for one line test name pattern in the middle test name with cutted tail and cutted highlighted pattern 1`] = `"should nam..."`; +exports[`for one line test name pattern in the middle test name with cutted tail and cutted highlighted pattern 1`] = `"should nam..."`; -exports[`for one line test name pattern in the middle test name with cutted tail and highlighted pattern 1`] = `"should name the functi..."`; +exports[`for one line test name pattern in the middle test name with cutted tail and highlighted pattern 1`] = `"should name the functi..."`; -exports[`for one line test name pattern in the middle test name with highlighted cutted 1`] = `"sho..."`; +exports[`for one line test name pattern in the middle test name with highlighted cutted 1`] = `"sho..."`; -exports[`for one line test name pattern in the middle test name with highlighted pattern returns 1`] = `"should name the function you attach"`; +exports[`for one line test name pattern in the middle test name with highlighted pattern returns 1`] = `"should name the function you attach"`; -exports[`for one line test name pattern in the tail returns test name with cutted tail and cutted highlighted pattern 1`] = `"should name the function you a..."`; +exports[`for one line test name pattern in the tail returns test name with cutted tail and cutted highlighted pattern 1`] = `"should name the function you a..."`; -exports[`for one line test name pattern in the tail returns test name with highlighted cutted 1`] = `"sho..."`; +exports[`for one line test name pattern in the tail returns test name with highlighted cutted 1`] = `"sho..."`; -exports[`for one line test name pattern in the tail returns test name with highlighted pattern 1`] = `"should name the function you attach"`; +exports[`for one line test name pattern in the tail returns test name with highlighted pattern 1`] = `"should name the function you attach"`; exports[`for one line test name with pattern in the head returns test name with cutted tail and cutted highlighted pattern 1`] = `"shoul..."`; -exports[`for one line test name with pattern in the head returns test name with cutted tail and highlighted pattern 1`] = `"should name the function yo..."`; +exports[`for one line test name with pattern in the head returns test name with cutted tail and highlighted pattern 1`] = `"should name the function yo..."`; -exports[`for one line test name with pattern in the head returns test name with highlighted pattern 1`] = `"should name the function you attach"`; +exports[`for one line test name with pattern in the head returns test name with highlighted pattern 1`] = `"should name the function you attach"`; diff --git a/packages/pretty-format/src/__tests__/__snapshots__/react.test.tsx.snap b/packages/pretty-format/src/__tests__/__snapshots__/react.test.tsx.snap index c1175a270604..222b132d362d 100644 --- a/packages/pretty-format/src/__tests__/__snapshots__/react.test.tsx.snap +++ b/packages/pretty-format/src/__tests__/__snapshots__/react.test.tsx.snap @@ -1,49 +1,49 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ReactElement plugin highlights syntax 1`] = ` -" - prop={ -
+" + prop={ +
mouse - + rat - -
- } -/>" + +
+ } +/>" `; exports[`ReactElement plugin highlights syntax with color from theme option 1`] = ` -" - style="color:red" -> +" + style="color:red" +> Hello, Mouse! -" +" `; exports[`ReactTestComponent plugin highlights syntax 1`] = ` -" - prop={ -
+" + prop={ +
mouse - + rat - -
- } -/>" + +
+ } +/>" `; exports[`ReactTestComponent plugin highlights syntax with color from theme option 1`] = ` -" - style="color:red" -> +" + style="color:red" +> Hello, Mouse! -" +" `; exports[`ReactTestComponent removes undefined props 1`] = ` -" - xyz={true} -/>" +" + xyz={true} +/>" `; diff --git a/yarn.lock b/yarn.lock index 3277d69b5b63..805666f1a366 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2712,7 +2712,7 @@ __metadata: jest-junit: ^13.0.0 jest-mock: "workspace:*" jest-runner-tsd: ^3.1.0 - jest-serializer-ansi-escapes: ^1.0.0 + jest-serializer-ansi-escapes: ^2.0.1 jest-silent-reporter: ^0.5.0 jest-snapshot: "workspace:*" jest-watch-typeahead: ^1.1.0 @@ -13647,10 +13647,10 @@ __metadata: languageName: unknown linkType: soft -"jest-serializer-ansi-escapes@npm:^1.0.0": - version: 1.0.1 - resolution: "jest-serializer-ansi-escapes@npm:1.0.1" - checksum: 9cf71b090d27b45a7237247feebb556c474cafc52d12c0e5c49b08a5b871dec6046a83343e148eb607f2e6eb901513946347c08708ff35b0daf514085d599c65 +"jest-serializer-ansi-escapes@npm:^2.0.1": + version: 2.0.1 + resolution: "jest-serializer-ansi-escapes@npm:2.0.1" + checksum: 90af1e8811656326375073472593370e6279ce9e4b965b1861d6c12a6cf0167b8b213261e837e1b2072aba5483cb87afcc1fea66af79b87bcf96f672f041e4af languageName: node linkType: hard