Skip to content

Commit

Permalink
[expo] Update LogSerialization tests (0-indexed columns, new symbolic…
Browse files Browse the repository at this point in the history
…ateStackTrace return)
  • Loading branch information
sjchmiela committed May 22, 2020
1 parent bd53b8b commit 526529e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
Expand Up @@ -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 })
)
);

Expand Down
Expand Up @@ -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`] = `
Expand All @@ -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"
`;
Expand Up @@ -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`] = `
Expand All @@ -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"
`;

0 comments on commit 526529e

Please sign in to comment.