diff --git a/e2e/Utils.ts b/e2e/Utils.ts index 7cc031d32ca9..1d52d74000f7 100644 --- a/e2e/Utils.ts +++ b/e2e/Utils.ts @@ -282,17 +282,6 @@ export const normalizeIcons = (str: string) => { .replace(new RegExp('\u221A', 'g'), '\u2713'); }; -export const rightTrimStdout = (str: string) => { - if (!str) { - return str; - } - - return str - .split('\n') - .map(str => str.trimRight()) - .join('\n'); -}; - // Certain environments (like CITGM and GH Actions) do not come with mercurial installed let hgIsInstalled: boolean | null = null; diff --git a/e2e/__tests__/__snapshots__/coverageHandlebars.test.ts.snap b/e2e/__tests__/__snapshots__/coverageHandlebars.test.ts.snap index 0ad6d083ffb9..7fe8d61b2167 100644 --- a/e2e/__tests__/__snapshots__/coverageHandlebars.test.ts.snap +++ b/e2e/__tests__/__snapshots__/coverageHandlebars.test.ts.snap @@ -2,9 +2,9 @@ exports[`code coverage for Handlebars 1`] = ` -----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -----------|---------|----------|---------|---------|------------------- -All files | 75 | 66.67 | 66.67 | 66.67 | - greet.hbs | 75 | 66.67 | 66.67 | 66.67 | 10 +All files | 75 | 66.67 | 66.67 | 66.67 | + greet.hbs | 75 | 66.67 | 66.67 | 66.67 | 10 -----------|---------|----------|---------|---------|------------------- `; diff --git a/e2e/__tests__/__snapshots__/coverageReport.test.ts.snap b/e2e/__tests__/__snapshots__/coverageReport.test.ts.snap index 5fff24158743..e96a7a6783d0 100644 --- a/e2e/__tests__/__snapshots__/coverageReport.test.ts.snap +++ b/e2e/__tests__/__snapshots__/coverageReport.test.ts.snap @@ -2,41 +2,41 @@ exports[`collects coverage from duplicate files avoiding shared cache 1`] = ` ---------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ---------------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - a | 100 | 100 | 100 | 100 | - identical.js | 100 | 100 | 100 | 100 | - b | 100 | 100 | 100 | 100 | - identical.js | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + a | 100 | 100 | 100 | 100 | + identical.js | 100 | 100 | 100 | 100 | + b | 100 | 100 | 100 | 100 | + identical.js | 100 | 100 | 100 | 100 | ---------------|---------|----------|---------|---------|------------------- `; exports[`collects coverage only from multiple specified files 1`] = ` --------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s --------------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - file.js | 100 | 100 | 100 | 100 | - otherFile.js | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + file.js | 100 | 100 | 100 | 100 | + otherFile.js | 100 | 100 | 100 | 100 | --------------|---------|----------|---------|---------|------------------- `; exports[`collects coverage only from specified file 1`] = ` ----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - file.js | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + file.js | 100 | 100 | 100 | 100 | ----------|---------|----------|---------|---------|------------------- `; exports[`collects coverage only from specified files avoiding dependencies 1`] = ` ----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- -All files | 87.5 | 100 | 50 | 100 | - sum.js | 87.5 | 100 | 50 | 100 | +All files | 87.5 | 100 | 50 | 100 | + sum.js | 87.5 | 100 | 50 | 100 | ----------|---------|----------|---------|---------|------------------- `; @@ -44,19 +44,19 @@ exports[`does not output coverage report when html is requested 1`] = ``; exports[`generates coverage when using the testRegex config param 1`] = ` -------------------------------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -------------------------------------|---------|----------|---------|---------|------------------- -All files | 60 | 0 | 50 | 60 | - coverage-report | 47.37 | 0 | 25 | 50 | - file.js | 100 | 100 | 100 | 100 | - notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19 - otherFile.js | 100 | 100 | 100 | 100 | - sum.js | 87.5 | 100 | 50 | 100 | - sumDependency.js | 0 | 0 | 0 | 0 | 8-12 - coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | - identical.js | 100 | 100 | 100 | 100 | - coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | - identical.js | 100 | 100 | 100 | 100 | +All files | 60 | 0 | 50 | 60 | + coverage-report | 47.37 | 0 | 25 | 50 | + file.js | 100 | 100 | 100 | 100 | + notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19 + otherFile.js | 100 | 100 | 100 | 100 | + sum.js | 87.5 | 100 | 50 | 100 | + sumDependency.js | 0 | 0 | 0 | 0 | 8-12 + coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | + identical.js | 100 | 100 | 100 | 100 | + coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | + identical.js | 100 | 100 | 100 | 100 | -------------------------------------|---------|----------|---------|---------|------------------- `; @@ -70,19 +70,19 @@ Ran all test suites. exports[`outputs coverage report 1`] = ` -------------------------------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -------------------------------------|---------|----------|---------|---------|------------------- -All files | 60 | 0 | 50 | 60 | - coverage-report | 47.37 | 0 | 25 | 50 | - file.js | 100 | 100 | 100 | 100 | - notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19 - otherFile.js | 100 | 100 | 100 | 100 | - sum.js | 87.5 | 100 | 50 | 100 | - sumDependency.js | 0 | 0 | 0 | 0 | 8-12 - coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | - identical.js | 100 | 100 | 100 | 100 | - coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | - identical.js | 100 | 100 | 100 | 100 | +All files | 60 | 0 | 50 | 60 | + coverage-report | 47.37 | 0 | 25 | 50 | + file.js | 100 | 100 | 100 | 100 | + notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19 + otherFile.js | 100 | 100 | 100 | 100 | + sum.js | 87.5 | 100 | 50 | 100 | + sumDependency.js | 0 | 0 | 0 | 0 | 8-12 + coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | + identical.js | 100 | 100 | 100 | 100 | + coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | + identical.js | 100 | 100 | 100 | 100 | -------------------------------------|---------|----------|---------|---------|------------------- `; @@ -95,37 +95,37 @@ Functions : 50% ( 3/6 ) Lines : 60% ( 12/20 ) ================================================================================ -------------------------------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -------------------------------------|---------|----------|---------|---------|------------------- -All files | 60 | 0 | 50 | 60 | - coverage-report | 47.37 | 0 | 25 | 50 | - file.js | 100 | 100 | 100 | 100 | - notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19 - otherFile.js | 100 | 100 | 100 | 100 | - sum.js | 87.5 | 100 | 50 | 100 | - sumDependency.js | 0 | 0 | 0 | 0 | 8-12 - coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | - identical.js | 100 | 100 | 100 | 100 | - coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | - identical.js | 100 | 100 | 100 | 100 | +All files | 60 | 0 | 50 | 60 | + coverage-report | 47.37 | 0 | 25 | 50 | + file.js | 100 | 100 | 100 | 100 | + notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19 + otherFile.js | 100 | 100 | 100 | 100 | + sum.js | 87.5 | 100 | 50 | 100 | + sumDependency.js | 0 | 0 | 0 | 0 | 8-12 + coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | + identical.js | 100 | 100 | 100 | 100 | + coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | + identical.js | 100 | 100 | 100 | 100 | -------------------------------------|---------|----------|---------|---------|------------------- `; exports[`outputs coverage report when text is requested 1`] = ` -------------------------------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -------------------------------------|---------|----------|---------|---------|------------------- -All files | 60 | 0 | 50 | 60 | - coverage-report | 47.37 | 0 | 25 | 50 | - file.js | 100 | 100 | 100 | 100 | - notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19 - otherFile.js | 100 | 100 | 100 | 100 | - sum.js | 87.5 | 100 | 50 | 100 | - sumDependency.js | 0 | 0 | 0 | 0 | 8-12 - coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | - identical.js | 100 | 100 | 100 | 100 | - coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | - identical.js | 100 | 100 | 100 | 100 | +All files | 60 | 0 | 50 | 60 | + coverage-report | 47.37 | 0 | 25 | 50 | + file.js | 100 | 100 | 100 | 100 | + notRequiredInTestSuite.js | 0 | 0 | 0 | 0 | 8-19 + otherFile.js | 100 | 100 | 100 | 100 | + sum.js | 87.5 | 100 | 50 | 100 | + sumDependency.js | 0 | 0 | 0 | 0 | 8-12 + coverage-report/cached-duplicates/a | 100 | 100 | 100 | 100 | + identical.js | 100 | 100 | 100 | 100 | + coverage-report/cached-duplicates/b | 100 | 100 | 100 | 100 | + identical.js | 100 | 100 | 100 | 100 | -------------------------------------|---------|----------|---------|---------|------------------- `; diff --git a/e2e/__tests__/__snapshots__/coverageThreshold.test.ts.snap b/e2e/__tests__/__snapshots__/coverageThreshold.test.ts.snap index c2c775449c6b..2357c88f67c0 100644 --- a/e2e/__tests__/__snapshots__/coverageThreshold.test.ts.snap +++ b/e2e/__tests__/__snapshots__/coverageThreshold.test.ts.snap @@ -17,20 +17,20 @@ Ran all test suites. exports[`excludes tests matched by path threshold groups from global group: stdout 1`] = ` -----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -----------|---------|----------|---------|---------|------------------- -All files | 50 | 100 | 50 | 50 | - apple.js | 0 | 100 | 0 | 0 | 1-2 - banana.js | 100 | 100 | 100 | 100 | +All files | 50 | 100 | 50 | 50 | + apple.js | 0 | 100 | 0 | 0 | 1-2 + banana.js | 100 | 100 | 100 | 100 | -----------|---------|----------|---------|---------|------------------- `; exports[`exits with 0 if global threshold group is not found in coverage data: stdout 1`] = ` -----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -----------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - banana.js | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + banana.js | 100 | 100 | 100 | 100 | -----------|---------|----------|---------|---------|------------------- `; @@ -51,10 +51,10 @@ Ran all test suites. exports[`exits with 1 if coverage threshold is not met: stdout 1`] = ` ----------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------------|---------|----------|---------|---------|------------------- -All files | 50 | 100 | 0 | 50 | - not-covered.js | 50 | 100 | 0 | 50 | 2 +All files | 50 | 100 | 0 | 50 | + not-covered.js | 50 | 100 | 0 | 50 | 2 ----------------|---------|----------|---------|---------|------------------- `; @@ -75,10 +75,10 @@ Ran all test suites. exports[`exits with 1 if path threshold group is not found in coverage data: stdout 1`] = ` -----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -----------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - banana.js | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + banana.js | 100 | 100 | 100 | 100 | -----------|---------|----------|---------|---------|------------------- `; @@ -101,9 +101,9 @@ Ran all test suites. exports[`file is matched by all path and glob threshold groups: stdout 1`] = ` -----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s -----------|---------|----------|---------|---------|------------------- -All files | 50 | 100 | 0 | 50 | - banana.js | 50 | 100 | 0 | 50 | 2 +All files | 50 | 100 | 0 | 50 | + banana.js | 50 | 100 | 0 | 50 | 2 -----------|---------|----------|---------|---------|------------------- `; diff --git a/e2e/__tests__/__snapshots__/coverageWithoutTransform.test.ts.snap b/e2e/__tests__/__snapshots__/coverageWithoutTransform.test.ts.snap index 243ea9ce9b34..0753ddeb2565 100644 --- a/e2e/__tests__/__snapshots__/coverageWithoutTransform.test.ts.snap +++ b/e2e/__tests__/__snapshots__/coverageWithoutTransform.test.ts.snap @@ -2,9 +2,9 @@ exports[`produces code coverage for uncovered files without transformer 1`] = ` ---------------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ---------------------|---------|----------|---------|---------|------------------- -All files | 0 | 100 | 0 | 0 | - some-random-file.js | 0 | 100 | 0 | 0 | 8-10 +All files | 0 | 100 | 0 | 0 | + some-random-file.js | 0 | 100 | 0 | 0 | 8-10 ---------------------|---------|----------|---------|---------|------------------- `; diff --git a/e2e/__tests__/__snapshots__/findRelatedFiles.test.ts.snap b/e2e/__tests__/__snapshots__/findRelatedFiles.test.ts.snap index 053e89fb6610..d7cf67285466 100644 --- a/e2e/__tests__/__snapshots__/findRelatedFiles.test.ts.snap +++ b/e2e/__tests__/__snapshots__/findRelatedFiles.test.ts.snap @@ -15,10 +15,10 @@ PASS __tests__/a.test.js exports[`--findRelatedTests flag coverage configuration is applied correctly 3`] = ` ----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - a.js | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + a.js | 100 | 100 | 100 | 100 | ----------|---------|----------|---------|---------|------------------- `; @@ -37,11 +37,11 @@ PASS __tests__/b.test.js exports[`--findRelatedTests flag generates coverage report for filename 3`] = ` ----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - a.js | 100 | 100 | 100 | 100 | - b.js | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + a.js | 100 | 100 | 100 | 100 | + b.js | 100 | 100 | 100 | 100 | ----------|---------|----------|---------|---------|------------------- `; @@ -60,9 +60,9 @@ PASS __tests__/a.test.js exports[`--findRelatedTests flag generates coverage report for filename 6`] = ` ----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - a.js | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + a.js | 100 | 100 | 100 | 100 | ----------|---------|----------|---------|---------|------------------- `; diff --git a/e2e/__tests__/__snapshots__/transform.test.ts.snap b/e2e/__tests__/__snapshots__/transform.test.ts.snap index 81c2ad0e6333..a68d884e885c 100644 --- a/e2e/__tests__/__snapshots__/transform.test.ts.snap +++ b/e2e/__tests__/__snapshots__/transform.test.ts.snap @@ -11,35 +11,35 @@ FAIL __tests__/ignoredFile.test.js exports[`babel-jest instruments only specific files and collects coverage 1`] = ` ------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ------------|---------|----------|---------|---------|------------------- -All files | 83.33 | 100 | 50 | 80 | - covered.js | 83.33 | 100 | 50 | 80 | 13 +All files | 83.33 | 100 | 50 | 80 | + covered.js | 83.33 | 100 | 50 | 80 | 13 ------------|---------|----------|---------|---------|------------------- `; exports[`custom transformer instruments files 1`] = ` ----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- -All files | 0 | 0 | 0 | 0 | +All files | 0 | 0 | 0 | 0 | ----------|---------|----------|---------|---------|------------------- `; exports[`no babel-jest instrumentation with no babel-jest 1`] = ` ------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ------------|---------|----------|---------|---------|------------------- -All files | 83.33 | 100 | 50 | 80 | - covered.js | 83.33 | 100 | 50 | 80 | 13 +All files | 83.33 | 100 | 50 | 80 | + covered.js | 83.33 | 100 | 50 | 80 | 13 ------------|---------|----------|---------|---------|------------------- `; exports[`transformer-config instruments only specific files and collects coverage 1`] = ` ------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ------------|---------|----------|---------|---------|------------------- -All files | 83.33 | 100 | 50 | 80 | - Covered.js | 83.33 | 100 | 50 | 80 | 13 +All files | 83.33 | 100 | 50 | 80 | + Covered.js | 83.33 | 100 | 50 | 80 | 13 ------------|---------|----------|---------|---------|------------------- `; diff --git a/e2e/__tests__/__snapshots__/typescriptCoverage.test.ts.snap b/e2e/__tests__/__snapshots__/typescriptCoverage.test.ts.snap index c30506ff553a..98190d64a6d6 100644 --- a/e2e/__tests__/__snapshots__/typescriptCoverage.test.ts.snap +++ b/e2e/__tests__/__snapshots__/typescriptCoverage.test.ts.snap @@ -2,9 +2,9 @@ exports[`instruments and collects coverage for typescript files 1`] = ` ------------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ------------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - covered.ts | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + covered.ts | 100 | 100 | 100 | 100 | ------------|---------|----------|---------|---------|------------------- `; diff --git a/e2e/__tests__/__snapshots__/v8Coverage.test.ts.snap b/e2e/__tests__/__snapshots__/v8Coverage.test.ts.snap index 535e824765ac..b2ec317a31d6 100644 --- a/e2e/__tests__/__snapshots__/v8Coverage.test.ts.snap +++ b/e2e/__tests__/__snapshots__/v8Coverage.test.ts.snap @@ -2,10 +2,10 @@ exports[`prints coverage with empty sourcemaps 1`] = ` ----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - types.ts | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + types.ts | 100 | 100 | 100 | 100 | ----------|---------|----------|---------|---------|------------------- `; @@ -16,10 +16,10 @@ exports[`prints coverage with missing sourcemaps 1`] = ` at Object.log (__tests__/Thing.test.js:10:9) ----------|---------|----------|---------|---------|------------------- -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s +File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- -All files | 100 | 100 | 100 | 100 | - Thing.js | 100 | 100 | 100 | 100 | - x.css | 100 | 100 | 100 | 100 | +All files | 100 | 100 | 100 | 100 | + Thing.js | 100 | 100 | 100 | 100 | + x.css | 100 | 100 | 100 | 100 | ----------|---------|----------|---------|---------|------------------- `; diff --git a/e2e/runJest.ts b/e2e/runJest.ts index 0c7d371a4c53..51b982b73752 100644 --- a/e2e/runJest.ts +++ b/e2e/runJest.ts @@ -13,7 +13,7 @@ import * as fs from 'graceful-fs'; import stripAnsi = require('strip-ansi'); import type {FormattedTestResults} from '@jest/test-result'; import type {Config} from '@jest/types'; -import {normalizeIcons, rightTrimStdout} from './Utils'; +import {normalizeIcons} from './Utils'; const JEST_PATH = path.resolve(__dirname, '../packages/jest-cli/bin/jest.js'); @@ -109,9 +109,9 @@ function normalizeStdoutAndStderr( options: RunJestOptions, ): RunJestResult { if (options.stripAnsi) result.stdout = stripAnsi(result.stdout); - result.stdout = normalizeIcons(rightTrimStdout(result.stdout)); + result.stdout = normalizeIcons(result.stdout); if (options.stripAnsi) result.stderr = stripAnsi(result.stderr); - result.stderr = normalizeIcons(rightTrimStdout(result.stderr)); + result.stderr = normalizeIcons(result.stderr); return result; } diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index af7b20d0add4..d197e542fff9 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -17,7 +17,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@babel/code-frame": "^7.0.0", + "@babel/code-frame": "^7.12.13", "@jest/types": "^27.0.0-next.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", 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 e6e03daebeee..a117e8c615fc 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 @@ -12,8 +12,8 @@ exports[`codeframe 1`] = ` Whoops! - > 1 | throw new Error(\\"Whoops!\\"); - | ^ + > 1 | throw new Error(\\"Whoops!\\"); + | ^ at Object. (file.js:1:7) " @@ -33,8 +33,8 @@ exports[`formatStackTrace does not print codeframe when noStackTrace = true 1`] exports[`formatStackTrace prints code frame and stacktrace 1`] = ` " - > 1 | throw new Error(\\"Whoops!\\"); - | ^ + > 1 | throw new Error(\\"Whoops!\\"); + | ^ at Object. (file.js:1:7) " diff --git a/yarn.lock b/yarn.lock index 9e60d5731674..ad2b0c01ef47 100644 --- a/yarn.lock +++ b/yarn.lock @@ -91,12 +91,12 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4": - version: 7.10.4 - resolution: "@babel/code-frame@npm:7.10.4" +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13": + version: 7.12.13 + resolution: "@babel/code-frame@npm:7.12.13" dependencies: - "@babel/highlight": ^7.10.4 - checksum: 05245d3b22a3ae849439195c4ee9ce9903dfd8c3fcb5124e77923c45e9f1ceac971cce4c61505974f411a9db432949531abe10ddee92937a0a9c306dc380a5b2 + "@babel/highlight": ^7.12.13 + checksum: 471532bb7cb4a300bd1a3201e75e7c0c83ebfb4e0e6610fdb53270521505d7efe0961258de61e7b1970ef3092a97ed675248ee1a44597912a1f61f903d85ef41 languageName: node linkType: hard @@ -373,10 +373,10 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.10.4": - version: 7.10.4 - resolution: "@babel/helper-validator-identifier@npm:7.10.4" - checksum: 25098ef842e3ffecdd9a7216f6173da7ad7be1b0b3e454a9f6965055154b9ad7a4acd2f218ba3d2efc0821bdab97837b3cb815844af7d72f66f89d446a54efc6 +"@babel/helper-validator-identifier@npm:^7.10.4, @babel/helper-validator-identifier@npm:^7.12.11": + version: 7.12.11 + resolution: "@babel/helper-validator-identifier@npm:7.12.11" + checksum: 18de432203264b501db2690b53370a4289dc56084f5a2c66de624b159ee28b8abaeb402b2b7584296d9261645d91ddb6bfd21125d3ffd9bf02e9262e77baf3d2 languageName: node linkType: hard @@ -410,14 +410,14 @@ __metadata: languageName: node linkType: hard -"@babel/highlight@npm:^7.0.0, @babel/highlight@npm:^7.10.4": - version: 7.10.4 - resolution: "@babel/highlight@npm:7.10.4" +"@babel/highlight@npm:^7.0.0, @babel/highlight@npm:^7.12.13": + version: 7.12.13 + resolution: "@babel/highlight@npm:7.12.13" dependencies: - "@babel/helper-validator-identifier": ^7.10.4 + "@babel/helper-validator-identifier": ^7.12.11 chalk: ^2.0.0 js-tokens: ^4.0.0 - checksum: c167b938af9797e7630dd922398ceb1a079469085b9c0a7274f093f9f2b1ef9f0a5efec89592e81cbab7c87a537d32c238cea97d288b7af9a0d26b2bceb7a439 + checksum: 83a3a2cc961b9e17fb75bd57ebf90cf07be6ec4263d74b60c435c28bcb045c474f0162eaa921ad7b44429d7624ec49b41cae416e475d3f747ccda678be1f7a8f languageName: node linkType: hard @@ -3784,9 +3784,9 @@ __metadata: linkType: hard "@types/node@npm:^14.0.27": - version: 14.14.10 - resolution: "@types/node@npm:14.14.10" - checksum: b793aa15e8c08df50d0f77dc0fe7a93bc2e09bfa5a424841d4dba045d6ae8503b7ffe89b773ffe197c9b637c898bb22e78442e21ff4b33414d35160d9c3f8a9b + version: 14.14.22 + resolution: "@types/node@npm:14.14.22" + checksum: e46e32685b4d0261779c13c10ba3ff220cfa714b5c12f8f571fd52cc309546bdbc8ffc86cbad20559ad88e7b17e66fc51c98b067d8c3766597092c05df157b9b languageName: node linkType: hard @@ -11889,7 +11889,7 @@ fsevents@~2.1.2: version: 0.0.0-use.local resolution: "jest-message-util@workspace:packages/jest-message-util" dependencies: - "@babel/code-frame": ^7.0.0 + "@babel/code-frame": ^7.12.13 "@jest/types": ^27.0.0-next.1 "@types/babel__code-frame": ^7.0.0 "@types/graceful-fs": ^4.1.3