Skip to content

Commit

Permalink
chore: update @babel/code-frame (jestjs#11048)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 3, 2021
1 parent baf9f99 commit 98ed700
Show file tree
Hide file tree
Showing 13 changed files with 143 additions and 154 deletions.
11 changes: 0 additions & 11 deletions e2e/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions e2e/__tests__/__snapshots__/coverageHandlebars.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------|---------|----------|---------|---------|-------------------
`;
128 changes: 64 additions & 64 deletions e2e/__tests__/__snapshots__/coverageReport.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,61 @@

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 |
----------|---------|----------|---------|---------|-------------------
`;

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 |
-------------------------------------|---------|----------|---------|---------|-------------------
`;

Expand All @@ -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 |
-------------------------------------|---------|----------|---------|---------|-------------------
`;
Expand All @@ -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 |
-------------------------------------|---------|----------|---------|---------|-------------------
`;
Expand Down
32 changes: 16 additions & 16 deletions e2e/__tests__/__snapshots__/coverageThreshold.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
-----------|---------|----------|---------|---------|-------------------
`;
Expand All @@ -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
----------------|---------|----------|---------|---------|-------------------
`;
Expand All @@ -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 |
-----------|---------|----------|---------|---------|-------------------
`;
Expand All @@ -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
-----------|---------|----------|---------|---------|-------------------
`;
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------------|---------|----------|---------|---------|-------------------
`;

0 comments on commit 98ed700

Please sign in to comment.