Skip to content

Commit

Permalink
Polish printing.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpojer committed Sep 23, 2016
1 parent 07445b7 commit fad0e0e
Show file tree
Hide file tree
Showing 18 changed files with 316 additions and 363 deletions.
23 changes: 10 additions & 13 deletions integration_tests/__tests__/__snapshots__/console-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ exports[`test console printing 1`] = `
`;

exports[`test console printing 2`] = `
"Test Summary: › Ran all tests.
suites: 1 passed (1 total)
tests: 1 passed (1 total)
snapshots: 0 passed (0 total)
time: <<REPLACED>>
"Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 passed, 0 total
Time: <<REPLACED>>
Ran all tests.
"
`;
Expand All @@ -45,16 +44,14 @@ exports[`test console printing with --verbose 2`] = `
" PASS __tests__/console-test.js
✓ works just fine
"
`;
exports[`test console printing with --verbose 3`] = `
"Test Summary: › Ran all tests.
suites: 1 passed (1 total)
tests: 1 passed (1 total)
snapshots: 0 passed (0 total)
time: <<REPLACED>>
"Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 passed, 0 total
Time: <<REPLACED>>
Ran all tests.
"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,11 @@ All files | 100 | 100 | 100 | 100 | |
`;

exports[`test json reporter printing with --coverage 1`] = `
" FAIL __tests__/sum-test.js
● sum › fails the test
expect(received).toEqual(expected)
Expected value to equal:
4
Received:
3
at Object.it (__tests__/sum-test.js:18:23)
sum
✓ adds numbers
✕ fails the test
Coverage Summary (add \"text\" to the \"coverageReporters\" setting to receive a full report)
› Statements: 100%
› Branches: 100%
› Lines: 100%
› Functions: 100%
"
`;

exports[`test json reporter printing with --coverage 2`] = `
"Test Summary: › Ran all tests.
suites: 1 failed, 1 passed (1 total)
tests: 1 failed, 1 passed (2 total)
snapshots: 0 passed (0 total)
time: <<REPLACED>>
"Test Suites: 1 failed, 0 passed, 1 total
Tests: 1 failed, 1 passed, 2 total
Snapshots: 0 passed, 0 total
Time: <<REPLACED>>
Ran all tests.
"
`;
Expand Down
36 changes: 15 additions & 21 deletions integration_tests/__tests__/__snapshots__/failures-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ Object {
Expected an Error, but \"1\" was thrown
",
"summary": "Test Summary: › Ran all tests matching \"throw-number-test.js\".
suites: 1 failed, 0 passed (1 total)
tests: 0 passed (0 total)
snapshots: 0 passed (0 total)
time: <<REPLACED>>
"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\".
",
}
`;
Expand All @@ -26,14 +24,12 @@ Object {
Error
banana
",
"summary": "Test Summary: › Ran all tests matching \"throw-string-test.js\".
suites: 1 failed, 0 passed (1 total)
tests: 0 passed (0 total)
snapshots: 0 passed (0 total)
time: <<REPLACED>>
"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\".
",
}
`;
Expand All @@ -45,14 +41,12 @@ Object {
Error: No message was provided
",
"summary": "Test Summary: › Ran all tests matching \"throw-object-test.js\".
suites: 1 failed, 0 passed (1 total)
tests: 0 passed (0 total)
snapshots: 0 passed (0 total)
time: <<REPLACED>>
"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\".
",
}
`;
20 changes: 3 additions & 17 deletions integration_tests/__tests__/__snapshots__/globals-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ exports[`test basic test constructs 1`] = `
✓ it
✓ test
Test Summary
› Ran all tests."
"
`;

exports[`test basic test constructs 2`] = `
Expand All @@ -19,16 +18,6 @@ Ran all tests.
"
`;
exports[`test global jest variables 2`] = `
"Test Summary: › Ran all tests.
suites: 1 passed (1 total)
tests: 4 passed (11 total)
snapshots: 0 passed (0 total)
time: <<REPLACED>>
"
`;
exports[`test only 1`] = `
" PASS __tests__/only-constructs-test.js
✓ test.only
Expand All @@ -43,8 +32,7 @@ exports[`test only 1`] = `
describe
✓ test
Test Summary
› Ran all tests."
"
`;
exports[`test only 2`] = `
Expand All @@ -71,8 +59,7 @@ exports[`test skips 1`] = `
describe
○ test
Test Summary
› Ran all tests."
"
`;
exports[`test skips 2`] = `
Expand All @@ -90,7 +77,6 @@ exports[`test tests with no implementation 1`] = `
○ it, no implementation
○ test, no implementation
"
`;
Expand Down
110 changes: 50 additions & 60 deletions integration_tests/__tests__/__snapshots__/snapshot-test.js.snap
Original file line number Diff line number Diff line change
@@ -1,99 +1,89 @@
exports[`Snapshot Validation deletes a snapshot when a test does removes all the snapshots 1`] = `
"Test Summary: › Ran all tests.
suites: 3 passed (3 total)
tests: 7 passed (7 total)
snapshots: 7 added, 0 passed (7 total)
time: <<REPLACED>>
"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 Summary: › Ran all tests.
suites: 3 passed (3 total)
tests: 5 passed (5 total)
snapshots: 4 passed (4 total)
time: <<REPLACED>>
"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 Summary: › Ran all tests.
suites: 3 passed (3 total)
tests: 7 passed (7 total)
snapshots: 7 added, 0 passed (7 total)
time: <<REPLACED>>
"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 Summary: › Ran all tests.
suites: 2 passed (2 total)
tests: 4 passed (4 total)
snapshots: 4 passed (4 total)
time: <<REPLACED>>
"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 Summary: › Ran all tests.
suites: 3 passed (3 total)
tests: 7 passed (7 total)
snapshots: 7 added, 0 passed (7 total)
time: <<REPLACED>>
"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 Summary: › Ran all tests.
suites: 3 passed (3 total)
tests: 7 passed (7 total)
snapshots: 1 updated, 5 passed (6 total)
time: <<REPLACED>>
"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 Summary: › Ran all tests.
suites: 2 passed (2 total)
tests: 4 passed (4 total)
snapshots: 4 added, 0 passed (4 total)
time: <<REPLACED>>
"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 Summary: › Ran all tests.
suites: 1 passed (1 total)
tests: 1 passed (1 total)
snapshots: 1 added, 0 passed (1 total)
time: <<REPLACED>>
"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 Summary: › Ran all tests.
suites: 1 passed (1 total)
tests: 2 passed (2 total)
snapshots: 1 added, 1 passed (2 total)
time: <<REPLACED>>
"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 Summary: › Ran all tests.
suites: 1 passed (1 total)
tests: 2 passed (2 total)
snapshots: 2 passed (2 total)
time: <<REPLACED>>
"Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 2 passed, 2 total
Time: <<REPLACED>>
Ran all tests.
"
`;
Loading

0 comments on commit fad0e0e

Please sign in to comment.