diff --git a/e2e/__tests__/__snapshots__/customMatcherStackTrace.test.js.snap b/e2e/__tests__/__snapshots__/customMatcherStackTrace.test.js.snap index 4a6b5758e60d..d88de254fe71 100644 --- a/e2e/__tests__/__snapshots__/customMatcherStackTrace.test.js.snap +++ b/e2e/__tests__/__snapshots__/customMatcherStackTrace.test.js.snap @@ -1,8 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`custom async matchers 1`] = ` -Object { - "rest": "FAIL __tests__/async.test.js +FAIL __tests__/async.test.js ✕ showing the stack trace for an async matcher ● showing the stack trace for an async matcher @@ -18,19 +17,10 @@ Object { 7 | async function toThrowCustomAsyncMatcherError() { at Object.toThrowCustomAsyncMatcherError (__tests__/async.test.js:4:22) - -", - "summary": "Test Suites: 1 failed, 1 total -Tests: 1 failed, 1 total -Snapshots: 0 total -Time: <> -Ran all test suites matching /async.test.js/i. -", -} `; exports[`works with custom matchers 1`] = ` -"FAIL __tests__/async.test.js +FAIL __tests__/async.test.js ● showing the stack trace for an async matcher We expect the stack trace and code fence for this matcher to be shown in the console. @@ -64,6 +54,4 @@ FAIL __tests__/sync.test.js at foo (__tests__/sync.test.js:52:7) at Object.callback (__tests__/sync.test.js:11:18) at Object.toCustomMatch (__tests__/sync.test.js:53:8) - -" `; diff --git a/e2e/__tests__/customMatcherStackTrace.test.js b/e2e/__tests__/customMatcherStackTrace.test.js index a4a8971d72b4..0912a65d8abb 100644 --- a/e2e/__tests__/customMatcherStackTrace.test.js +++ b/e2e/__tests__/customMatcherStackTrace.test.js @@ -27,7 +27,7 @@ test('works with custom matchers', () => { test('custom async matchers', () => { const {stderr} = runJest('custom-matcher-stack-trace', ['async.test.js']); - const result = extractSummary(stderr); + const {rest} = extractSummary(stderr); - expect(result).toMatchSnapshot(); + expect(wrap(rest)).toMatchSnapshot(); });