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

chore: avoid adding trailing whitespace to blank lines in stack traces #6211

Merged
merged 7 commits into from
May 22, 2018
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@
([#5812](https://github.com/facebook/jest/issues/5812))
* `[jest-runtime]` [**BREAKING**] Remove `jest.genMockFn` and
`jest.genMockFunction` ([#6173](https://github.com/facebook/jest/pull/6173))
* `[jest-message-util]` Avoid adding unnecessary indent to blank lines in stack
traces ([#6211](https://github.com/facebook/jest/pull/6211))

## 22.4.2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`works with custom matchers 1`] = `
46 | };
47 |
48 | // This expecation fails due to an error we throw (intentionally)

at __tests__/custom_matcher.test.js:45:13
at __tests__/custom_matcher.test.js:43:23
at __tests__/custom_matcher.test.js:42:23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exports[`prints out info about open handlers 1`] = `
> 7 | app.listen({host: 'localhost', port: 0});
| ^
8 |

at Object.<anonymous> (server.js:7:5)
at Object.<anonymous> (__tests__/test.js:3:1)"
`;
6 changes: 3 additions & 3 deletions integration-tests/__tests__/__snapshots__/each.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ exports[`shows error message when not enough arguments are supplied to tests 1`]

Not enough arguments supplied for given headings:
left | right

Received:
Array [
true,
true,
true,
]

Missing 1 arguments

at packages/jest-jasmine2/build/each.js:84:17

"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ exports[`shows the correct errors in stderr when failing tests 1`] = `
● fail with expected non promise values

Error

Error: Expected value to have length:
2
Received:
Expand All @@ -20,6 +21,7 @@ exports[`shows the correct errors in stderr when failing tests 1`] = `
● fail with expected non promise values and not

Error

Error: Expected value to not have length:
2
Received:
Expand All @@ -43,7 +45,7 @@ exports[`shows the correct errors in stderr when failing tests 1`] = `
25 | Promise.resolve(2)
26 | );
27 | });

at __tests__/failure.test.js:24:54
at __tests__/failure.test.js:11:191
at __tests__/failure.test.js:11:437
Expand All @@ -65,7 +67,7 @@ exports[`shows the correct errors in stderr when failing tests 1`] = `
31 | Promise.resolve(2)
32 | );
33 | });

at __tests__/failure.test.js:30:61
at __tests__/failure.test.js:11:191
at __tests__/failure.test.js:11:437
Expand Down