Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding a percentage of tests #14841

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -9,7 +9,7 @@ Force exiting Jest: Have you considered using \`--detectOpenHandles\` to detect
`;

exports[`CLI accepts exact file names if matchers matched 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
14 changes: 7 additions & 7 deletions e2e/__tests__/__snapshots__/console.test.ts.snap
Expand Up @@ -41,7 +41,7 @@ exports[`console printing 1`] = `
`;

exports[`console printing 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down Expand Up @@ -92,7 +92,7 @@ exports[`console printing with --verbose 2`] = `
`;

exports[`console printing with --verbose 3`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down Expand Up @@ -127,7 +127,7 @@ exports[`does not error out when using winston 2`] = `
`;

exports[`does not error out when using winston 3`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -139,7 +139,7 @@ exports[`does not print to console with --silent 1`] = `""`;
exports[`does not print to console with --silent 2`] = `"PASS __tests__/console.test.js"`;

exports[`does not print to console with --silent 3`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>"
Expand Down Expand Up @@ -174,7 +174,7 @@ exports[`respects --noStackTrace 2`] = `
`;

exports[`respects --noStackTrace 3`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down Expand Up @@ -210,7 +210,7 @@ exports[`respects noStackTrace in config 2`] = `
`;

exports[`respects noStackTrace in config 3`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -225,7 +225,7 @@ exports[`the jsdom console is the same as the test console 2`] = `
`;

exports[`the jsdom console is the same as the test console 3`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/__snapshots__/consoleDebugging.test.ts.snap
Expand Up @@ -14,7 +14,7 @@ exports[`console debugging with --verbose 2`] = `
`;

exports[`console debugging with --verbose 3`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 1 passed, 1 total
Time: <<REPLACED>>
Expand Down
Expand Up @@ -9,7 +9,7 @@ Force exiting Jest: Have you considered using \`--detectOpenHandles\` to detect
`;

exports[`prints console.logs when run with forceExit 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/__snapshots__/coverageReport.test.ts.snap
Expand Up @@ -61,7 +61,7 @@ All files | 60 | 0 | 50 | 60 |
`;

exports[`json reporter printing with --coverage 1`] = `
"Test Suites: 1 failed, 1 total
"Test Suites: 1 failed, 1 total (100%)
Tests: 1 failed, 1 skipped, 2 passed, 4 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
8 changes: 4 additions & 4 deletions e2e/__tests__/__snapshots__/coverageThreshold.test.ts.snap
Expand Up @@ -8,7 +8,7 @@ Jest: "global" coverage threshold for lines (100%) not met: 0%"
`;

exports[`excludes tests matched by path threshold groups from global group 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down Expand Up @@ -42,7 +42,7 @@ Jest: "global" coverage threshold for lines (90%) not met: 50%"
`;

exports[`exits with 1 if coverage threshold is not met 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -66,7 +66,7 @@ Jest: Coverage data for apple.js was not found."
`;

exports[`exits with 1 if path threshold group is not found in coverage data 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -92,7 +92,7 @@ Jest: "./banana.js" coverage threshold for lines (100%) not met: 50%"
`;

exports[`file is matched by all path and glob threshold groups 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/__snapshots__/customReporters.test.ts.snap
Expand Up @@ -78,7 +78,7 @@ exports[`Custom Reporters Integration default reporters enabled 1`] = `
`;

exports[`Custom Reporters Integration default reporters enabled 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/__snapshots__/domDiffing.test.ts.snap
Expand Up @@ -45,7 +45,7 @@ exports[`should work without error 1`] = `
`;

exports[`should work without error 2`] = `
"Test Suites: 1 failed, 1 total
"Test Suites: 1 failed, 1 total (100%)
Tests: 2 failed, 2 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
Expand Up @@ -3,7 +3,7 @@
exports[`hook in describe with skipped test 1`] = `
Object {
"rest": "",
"summary": "Test Suites: 1 skipped, 0 of 1 total
"summary": "Test Suites: 1 skipped, 0 of 1 total (1%)
Tests: 1 skipped, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -30,7 +30,7 @@ Object {

at beforeEach (__tests__/hookInEmptyDescribe.test.js:9:3)
at Object.describe (__tests__/hookInEmptyDescribe.test.js:8:1)",
"summary": "Test Suites: 1 failed, 1 total
"summary": "Test Suites: 1 failed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -57,7 +57,7 @@ Object {

at beforeEach (__tests__/hookInEmptyNestedDescribe.test.js:9:3)
at Object.describe (__tests__/hookInEmptyNestedDescribe.test.js:8:1)",
"summary": "Test Suites: 1 failed, 1 total
"summary": "Test Suites: 1 failed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down Expand Up @@ -129,7 +129,7 @@ Object {

at beforeAll (__tests__/multipleHooksInEmptyDescribe.test.js:12:3)
at Object.describe (__tests__/multipleHooksInEmptyDescribe.test.js:8:1)",
"summary": "Test Suites: 1 failed, 1 total
"summary": "Test Suites: 1 failed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
6 changes: 3 additions & 3 deletions e2e/__tests__/__snapshots__/findRelatedFiles.test.ts.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`--findRelatedTests flag coverage configuration is applied correctly 1`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -23,7 +23,7 @@ All files | 100 | 100 | 100 | 100 |
`;

exports[`--findRelatedTests flag generates coverage report for filename 1`] = `
"Test Suites: 2 passed, 2 total
"Test Suites: 2 passed, 2 total (100%)
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -46,7 +46,7 @@ All files | 100 | 100 | 100 | 100 |
`;

exports[`--findRelatedTests flag generates coverage report for filename 4`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
22 changes: 11 additions & 11 deletions e2e/__tests__/__snapshots__/globals.test.ts.snap
Expand Up @@ -10,7 +10,7 @@ exports[`basic test constructs 1`] = `
`;

exports[`basic test constructs 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 4 passed, 4 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -30,7 +30,7 @@ exports[`cannot have describe with no implementation 1`] = `
`;

exports[`cannot have describe with no implementation 2`] = `
"Test Suites: 1 failed, 1 total
"Test Suites: 1 failed, 1 total (100%)
Tests: 0 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -52,7 +52,7 @@ exports[`cannot test with no implementation 1`] = `
`;

exports[`cannot test with no implementation 2`] = `
"Test Suites: 1 failed, 1 total
"Test Suites: 1 failed, 1 total (100%)
Tests: 0 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -74,7 +74,7 @@ exports[`cannot test with no implementation with expand arg 1`] = `
`;

exports[`cannot test with no implementation with expand arg 2`] = `
"Test Suites: 1 failed, 1 total
"Test Suites: 1 failed, 1 total (100%)
Tests: 0 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -88,7 +88,7 @@ exports[`function as describe() descriptor 1`] = `
`;

exports[`function as describe() descriptor 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -101,7 +101,7 @@ exports[`function as it() descriptor 1`] = `
`;

exports[`function as it() descriptor 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -117,7 +117,7 @@ exports[`interleaved describe and test children order 1`] = `
`;

exports[`interleaved describe and test children order 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 3 passed, 3 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -140,7 +140,7 @@ exports[`only 1`] = `
`;

exports[`only 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 skipped, 7 passed, 8 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -163,7 +163,7 @@ exports[`only with expand arg 1`] = `
`;

exports[`only with expand arg 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 skipped, 7 passed, 8 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -187,7 +187,7 @@ exports[`skips 1`] = `
`;

exports[`skips 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 8 skipped, 1 passed, 9 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -211,7 +211,7 @@ exports[`skips with expand arg 1`] = `
`;

exports[`skips with expand arg 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 8 skipped, 1 passed, 9 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
4 changes: 2 additions & 2 deletions e2e/__tests__/__snapshots__/injectGlobals.test.ts.snap
Expand Up @@ -6,7 +6,7 @@ exports[`globals are undefined if passed \`false\` from CLI 1`] = `
`;

exports[`globals are undefined if passed \`false\` from CLI 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -19,7 +19,7 @@ exports[`globals are undefined if passed \`false\` from config 1`] = `
`;

exports[`globals are undefined if passed \`false\` from config 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`runs test with isolate modules async import 1`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
4 changes: 2 additions & 2 deletions e2e/__tests__/__snapshots__/jest.config.js.test.ts.snap
Expand Up @@ -15,7 +15,7 @@ exports[`traverses directory tree up until it finds jest.config 2`] = `
`;

exports[`traverses directory tree up until it finds jest.config 3`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -28,7 +28,7 @@ exports[`works with jest.config.js 1`] = `
`;

exports[`works with jest.config.js 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down
6 changes: 3 additions & 3 deletions e2e/__tests__/__snapshots__/jest.config.ts.test.ts.snap
Expand Up @@ -15,7 +15,7 @@ exports[`traverses directory tree up until it finds jest.config 2`] = `
`;

exports[`traverses directory tree up until it finds jest.config 3`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -28,7 +28,7 @@ exports[`works with jest.config.ts 1`] = `
`;

exports[`works with jest.config.ts 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand All @@ -41,7 +41,7 @@ exports[`works with tsconfig.json 1`] = `
`;

exports[`works with tsconfig.json 2`] = `
"Test Suites: 1 passed, 1 total
"Test Suites: 1 passed, 1 total (100%)
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: <<REPLACED>>
Expand Down