Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Concurrent reporter + Run failed tests first (#1480)
* Concurrent reporter * Cleanup and Fixes * Add estimated runtime. * Run failed tests first. * Progress bar + printing cleanups. * Polish printing.
- Loading branch information
1 parent
6546bcb
commit 428565b
Showing
31 changed files
with
1,302 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 30 additions & 15 deletions
45
integration_tests/__tests__/__snapshots__/failures-test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,52 @@ | ||
exports[`test throwing not Error objects 1`] = ` | ||
" FAIL __tests__/throw-number-test.js | ||
Object { | ||
"rest": " FAIL __tests__/throw-number-test.js | ||
● Test suite failed to run | ||
Expected an Error, but \"1\" was thrown | ||
Test Summary | ||
› Ran all tests matching \"throw-number-test.js\". | ||
› 1 test suite failed, 0 tests passed (0 total in 1 test suite, <TIME>) | ||
" | ||
", | ||
"summary": "Test Suites: 1 failed, 0 passed, 1 total | ||
Tests: 0 passed, 0 total | ||
Snapshots: 0 passed, 0 total | ||
Time: <<REPLACED>> | ||
Ran all tests matching \"throw-number-test.js\". | ||
", | ||
} | ||
`; | ||
|
||
exports[`test throwing not Error objects 2`] = ` | ||
" FAIL __tests__/throw-string-test.js | ||
Object { | ||
"rest": " FAIL __tests__/throw-string-test.js | ||
● Test suite failed to run | ||
Error | ||
banana | ||
Test Summary | ||
› Ran all tests matching \"throw-string-test.js\". | ||
› 1 test suite failed, 0 tests passed (0 total in 1 test suite, <TIME>) | ||
" | ||
", | ||
"summary": "Test Suites: 1 failed, 0 passed, 1 total | ||
Tests: 0 passed, 0 total | ||
Snapshots: 0 passed, 0 total | ||
Time: <<REPLACED>> | ||
Ran all tests matching \"throw-string-test.js\". | ||
", | ||
} | ||
`; | ||
|
||
exports[`test throwing not Error objects 3`] = ` | ||
" FAIL __tests__/throw-object-test.js | ||
Object { | ||
"rest": " FAIL __tests__/throw-object-test.js | ||
● Test suite failed to run | ||
Error: No message was provided | ||
Test Summary | ||
› Ran all tests matching \"throw-object-test.js\". | ||
› 1 test suite failed, 0 tests passed (0 total in 1 test suite, <TIME>) | ||
" | ||
", | ||
"summary": "Test Suites: 1 failed, 0 passed, 1 total | ||
Tests: 0 passed, 0 total | ||
Snapshots: 0 passed, 0 total | ||
Time: <<REPLACED>> | ||
Ran all tests matching \"throw-object-test.js\". | ||
", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
integration_tests/__tests__/__snapshots__/snapshot-test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
exports[`Snapshot Validation deletes a snapshot when a test does removes all the snapshots 1`] = ` | ||
"Test Suites: 3 passed, 3 total | ||
Tests: 7 passed, 7 total | ||
Snapshots: 7 added, 0 passed, 7 total | ||
Time: <<REPLACED>> | ||
Ran all tests. | ||
" | ||
`; | ||
exports[`Snapshot Validation deletes a snapshot when a test does removes all the snapshots 2`] = ` | ||
"Test Suites: 3 passed, 3 total | ||
Tests: 5 passed, 5 total | ||
Snapshots: 4 passed, 4 total | ||
Time: <<REPLACED>> | ||
Ran all tests. | ||
" | ||
`; | ||
exports[`Snapshot Validation deletes the snapshot if the test file has been removed 1`] = ` | ||
"Test Suites: 3 passed, 3 total | ||
Tests: 7 passed, 7 total | ||
Snapshots: 7 added, 0 passed, 7 total | ||
Time: <<REPLACED>> | ||
Ran all tests. | ||
" | ||
`; | ||
exports[`Snapshot Validation deletes the snapshot if the test file has been removed 2`] = ` | ||
"Test Suites: 2 passed, 2 total | ||
Tests: 4 passed, 4 total | ||
Snapshots: 4 passed, 4 total | ||
Time: <<REPLACED>> | ||
Ran all tests. | ||
" | ||
`; | ||
exports[`Snapshot Validation updates the snapshot when a test removes some snapshots 1`] = ` | ||
"Test Suites: 3 passed, 3 total | ||
Tests: 7 passed, 7 total | ||
Snapshots: 7 added, 0 passed, 7 total | ||
Time: <<REPLACED>> | ||
Ran all tests. | ||
" | ||
`; | ||
exports[`Snapshot Validation updates the snapshot when a test removes some snapshots 2`] = ` | ||
"Test Suites: 3 passed, 3 total | ||
Tests: 7 passed, 7 total | ||
Snapshots: 1 updated, 5 passed, 6 total | ||
Time: <<REPLACED>> | ||
Ran all tests. | ||
" | ||
`; | ||
exports[`Snapshot works as expected 1`] = ` | ||
"Test Suites: 2 passed, 2 total | ||
Tests: 4 passed, 4 total | ||
Snapshots: 4 added, 0 passed, 4 total | ||
Time: <<REPLACED>> | ||
Ran all tests. | ||
" | ||
`; | ||
exports[`Snapshot works with escaped characters 1`] = ` | ||
"Test Suites: 1 passed, 1 total | ||
Tests: 1 passed, 1 total | ||
Snapshots: 1 added, 0 passed, 1 total | ||
Time: <<REPLACED>> | ||
Ran all tests. | ||
" | ||
`; | ||
exports[`Snapshot works with escaped characters 2`] = ` | ||
"Test Suites: 1 passed, 1 total | ||
Tests: 2 passed, 2 total | ||
Snapshots: 1 added, 1 passed, 2 total | ||
Time: <<REPLACED>> | ||
Ran all tests. | ||
" | ||
`; | ||
exports[`Snapshot works with escaped characters 3`] = ` | ||
"Test Suites: 1 passed, 1 total | ||
Tests: 2 passed, 2 total | ||
Snapshots: 2 passed, 2 total | ||
Time: <<REPLACED>> | ||
Ran all tests. | ||
" | ||
`; |
53 changes: 53 additions & 0 deletions
53
integration_tests/__tests__/__snapshots__/stack_trace-test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
exports[`Stack Trace does not print a stack trace for errors when --noStackTrace is given 1`] = ` | ||
"Test Suites: 1 failed, 0 passed, 1 total | ||
Tests: 3 failed, 0 passed, 3 total | ||
Snapshots: 0 passed, 0 total | ||
Time: <<REPLACED>> | ||
Ran all tests matching \"test-error-test.js\". | ||
" | ||
`; | ||
exports[`Stack Trace does not print a stack trace for matching errors when --noStackTrace is given 1`] = ` | ||
"Test Suites: 1 failed, 0 passed, 1 total | ||
Tests: 1 failed, 0 passed, 1 total | ||
Snapshots: 0 passed, 0 total | ||
Time: <<REPLACED>> | ||
Ran all tests matching \"stack-trace-test.js\". | ||
" | ||
`; | ||
exports[`Stack Trace does not print a stack trace for runtime errors when --noStackTrace is given 1`] = ` | ||
"Test Suites: 1 failed, 0 passed, 1 total | ||
Tests: 0 passed, 0 total | ||
Snapshots: 0 passed, 0 total | ||
Time: <<REPLACED>> | ||
Ran all tests matching \"runtime-error-test.js\". | ||
" | ||
`; | ||
exports[`Stack Trace prints a stack trace for errors 1`] = ` | ||
"Test Suites: 1 failed, 0 passed, 1 total | ||
Tests: 3 failed, 0 passed, 3 total | ||
Snapshots: 0 passed, 0 total | ||
Time: <<REPLACED>> | ||
Ran all tests matching \"test-error-test.js\". | ||
" | ||
`; | ||
exports[`Stack Trace prints a stack trace for matching errors 1`] = ` | ||
"Test Suites: 1 failed, 0 passed, 1 total | ||
Tests: 1 failed, 0 passed, 1 total | ||
Snapshots: 0 passed, 0 total | ||
Time: <<REPLACED>> | ||
Ran all tests matching \"stack-trace-test.js\". | ||
" | ||
`; | ||
exports[`Stack Trace prints a stack trace for runtime errors 1`] = ` | ||
"Test Suites: 1 failed, 0 passed, 1 total | ||
Tests: 0 passed, 0 total | ||
Snapshots: 0 passed, 0 total | ||
Time: <<REPLACED>> | ||
Ran all tests matching \"runtime-error-test.js\". | ||
" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.