From 526529ea169672615793330f2a9285462354c7b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Chmiela?= Date: Fri, 22 May 2020 10:02:59 +0200 Subject: [PATCH] [expo] Update LogSerialization tests (0-indexed columns, new symbolicateStackTrace return) --- .../__tests__/LogSerialization-test.native.tsx | 7 +++---- ...LogSerialization-test.native.tsx.snap.android | 16 ++++++++-------- .../LogSerialization-test.native.tsx.snap.ios | 16 ++++++++-------- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/packages/expo/src/logs/__tests__/LogSerialization-test.native.tsx b/packages/expo/src/logs/__tests__/LogSerialization-test.native.tsx index 7c92fde861c3d..3cd6b52e0c817 100644 --- a/packages/expo/src/logs/__tests__/LogSerialization-test.native.tsx +++ b/packages/expo/src/logs/__tests__/LogSerialization-test.native.tsx @@ -7,10 +7,9 @@ import LogSerialization from '../LogSerialization'; import { LogErrorData } from '../RemoteLogging'; jest.mock('react-native/Libraries/Core/Devtools/symbolicateStackTrace', () => - jest.fn( - async stack => - // We don't test symbolication itself in this test, partly because it's complex - stack + jest.fn(async stack => + // We don't test symbolication itself in this test, partly because it's complex + ({ stack }) ) ); diff --git a/packages/expo/src/logs/__tests__/__snapshots__/LogSerialization-test.native.tsx.snap.android b/packages/expo/src/logs/__tests__/__snapshots__/LogSerialization-test.native.tsx.snap.android index 613357b344b0b..032fd9cabd4d4 100644 --- a/packages/expo/src/logs/__tests__/__snapshots__/LogSerialization-test.native.tsx.snap.android +++ b/packages/expo/src/logs/__tests__/__snapshots__/LogSerialization-test.native.tsx.snap.android @@ -22,10 +22,10 @@ Array [ `; exports[`with stack trace support in Expo CLI doesn't fail if symbolication fails 1`] = ` -"/home/test/project/App.js:125:13 in _exampleFunction -/home/test/project/node_modules/dep/index.js:77:45 in _depRunCallbacks -/home/test/project/node_modules/react-native/node_modules/promise/lib/core.js:45:5 in tryCallTwo -/home/test/project/node_modules/react-native/node_modules/promise/lib/core.js:200:13 in doResolve" +"/home/test/project/App.js:125:12 in _exampleFunction +/home/test/project/node_modules/dep/index.js:77:44 in _depRunCallbacks +/home/test/project/node_modules/react-native/node_modules/promise/lib/core.js:45:4 in tryCallTwo +/home/test/project/node_modules/react-native/node_modules/promise/lib/core.js:200:12 in doResolve" `; exports[`with stack trace support in Expo CLI doesn't fail if the error has no stack frames 1`] = ` @@ -50,8 +50,8 @@ Object { `; exports[`with stack trace support in Expo CLI includes a symbolicated stack trace when logging an error 1`] = ` -"App.js:125:13 in _exampleFunction -node_modules/dep/index.js:77:45 in _depRunCallbacks -node_modules/react-native/node_modules/promise/lib/core.js:45:5 in tryCallTwo -node_modules/react-native/node_modules/promise/lib/core.js:200:13 in doResolve" +"App.js:125:12 in _exampleFunction +node_modules/dep/index.js:77:44 in _depRunCallbacks +node_modules/react-native/node_modules/promise/lib/core.js:45:4 in tryCallTwo +node_modules/react-native/node_modules/promise/lib/core.js:200:12 in doResolve" `; diff --git a/packages/expo/src/logs/__tests__/__snapshots__/LogSerialization-test.native.tsx.snap.ios b/packages/expo/src/logs/__tests__/__snapshots__/LogSerialization-test.native.tsx.snap.ios index 613357b344b0b..032fd9cabd4d4 100644 --- a/packages/expo/src/logs/__tests__/__snapshots__/LogSerialization-test.native.tsx.snap.ios +++ b/packages/expo/src/logs/__tests__/__snapshots__/LogSerialization-test.native.tsx.snap.ios @@ -22,10 +22,10 @@ Array [ `; exports[`with stack trace support in Expo CLI doesn't fail if symbolication fails 1`] = ` -"/home/test/project/App.js:125:13 in _exampleFunction -/home/test/project/node_modules/dep/index.js:77:45 in _depRunCallbacks -/home/test/project/node_modules/react-native/node_modules/promise/lib/core.js:45:5 in tryCallTwo -/home/test/project/node_modules/react-native/node_modules/promise/lib/core.js:200:13 in doResolve" +"/home/test/project/App.js:125:12 in _exampleFunction +/home/test/project/node_modules/dep/index.js:77:44 in _depRunCallbacks +/home/test/project/node_modules/react-native/node_modules/promise/lib/core.js:45:4 in tryCallTwo +/home/test/project/node_modules/react-native/node_modules/promise/lib/core.js:200:12 in doResolve" `; exports[`with stack trace support in Expo CLI doesn't fail if the error has no stack frames 1`] = ` @@ -50,8 +50,8 @@ Object { `; exports[`with stack trace support in Expo CLI includes a symbolicated stack trace when logging an error 1`] = ` -"App.js:125:13 in _exampleFunction -node_modules/dep/index.js:77:45 in _depRunCallbacks -node_modules/react-native/node_modules/promise/lib/core.js:45:5 in tryCallTwo -node_modules/react-native/node_modules/promise/lib/core.js:200:13 in doResolve" +"App.js:125:12 in _exampleFunction +node_modules/dep/index.js:77:44 in _depRunCallbacks +node_modules/react-native/node_modules/promise/lib/core.js:45:4 in tryCallTwo +node_modules/react-native/node_modules/promise/lib/core.js:200:12 in doResolve" `;