Skip to content

Commit

Permalink
more node 6 stack cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Apr 16, 2018
1 parent 13368dc commit d01429f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`shows the correct errors in stderr when failing tests 1`] = `
Object {
"rest": "FAIL __tests__/failure.test.js
"FAIL __tests__/failure.test.js
✕ fail with expected non promise values
✕ fail with expected non promise values and not
✕ fail with expected promise values
Expand Down Expand Up @@ -45,7 +44,6 @@ Object {
26 | );
27 | });
at packages/expect/build/index.js:165:22
at __tests__/failure.test.js:24:54
at __tests__/failure.test.js:11:191
at __tests__/failure.test.js:11:437
Expand All @@ -68,18 +66,10 @@ Object {
32 | );
33 | });
at packages/expect/build/index.js:165:22
at __tests__/failure.test.js:30:61
at __tests__/failure.test.js:11:191
at __tests__/failure.test.js:11:437
at __tests__/failure.test.js:11:99
",
"summary": "Test Suites: 1 failed, 1 total
Tests: 4 failed, 4 total
Snapshots: 0 total
Time: <<REPLACED>>
Ran all test suites matching /failure.test.js/i.
",
}
"
`;
8 changes: 7 additions & 1 deletion integration-tests/__tests__/expect-async-matcher.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,11 @@ test('shows the correct errors in stderr when failing tests', () => {
const result = runJest(dir, ['failure.test.js']);

expect(result.status).toBe(1);
expect(extractSummary(result.stderr)).toMatchSnapshot();

const rest = extractSummary(result.stderr)
.rest.split('\n')
.filter(line => line.indexOf('packages/expect/build/index.js') === -1)
.join('\n');

expect(rest).toMatchSnapshot();
});

0 comments on commit d01429f

Please sign in to comment.