Stabilize iOS/watchOS/tvOS apps and add cross-platform audit remediation
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import XCTest
|
||||
@testable import SharedCore
|
||||
|
||||
final class RuntimeReporterTests: XCTestCase {
|
||||
func testReporterInvokesSinkWithMetadata() {
|
||||
let expectation = expectation(description: "sink called")
|
||||
|
||||
RuntimeReporter.shared.setSink { event in
|
||||
XCTAssertEqual(event.severity, .error)
|
||||
XCTAssertEqual(event.message, "network failure")
|
||||
XCTAssertEqual(event.metadata["status"], "500")
|
||||
expectation.fulfill()
|
||||
}
|
||||
|
||||
RuntimeReporter.shared.recordError("network failure", metadata: ["status": "500"])
|
||||
|
||||
waitForExpectations(timeout: 1.0)
|
||||
RuntimeReporter.shared.setSink(nil)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user