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

Add tests for logError thread-safety / Make it return a value #259

Open
mokagio opened this issue Jun 19, 2023 · 0 comments
Open

Add tests for logError thread-safety / Make it return a value #259

mokagio opened this issue Jun 19, 2023 · 0 comments

Comments

@mokagio
Copy link
Contributor

mokagio commented Jun 19, 2023

See @salimbraksa's comment from Jetpack and WordPress iOS: https://github.com/wordpress-mobile/WordPress-iOS/pull/20846/files#r1231271865

I could only find one usage of logError in the tests, and is commented:

///
/// These are currently disabled, but are being left here, because I'm hoping to get
/// back to this and sort out how to send stack traces for these events.
///
// func testThatLoggedErrorsContainAStackTrace() {
// let expectation = XCTestExpectation(description: "Event should contain a Stack Trace")
//
// mockDataProvider.didLogErrorCallback = { event in
// expectation.isInverted = event.stacktrace == nil // fail if `stacktrace` is nil
// expectation.fulfill()
// }
//
// CrashLogging.start(withDataProvider: mockDataProvider)
// CrashLogging.logError("This is a test")
//
// wait(for: [expectation], timeout: 1)
// }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant