We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1687f0c commit 42d402fCopy full SHA for 42d402f
FirebaseFunctions/Tests/CombineUnit/HTTPSCallableTests.swift
@@ -44,15 +44,18 @@ class MockFunctions: Functions {
44
withObject data: Any?,
45
options: HTTPSCallableOptions?,
46
timeout: TimeInterval,
47
- completion: @escaping (
48
- (Result<HTTPSCallableResult, any Error>) -> Void
49
- )) {
+ completion: @escaping @MainActor
+ (Result<HTTPSCallableResult, any Error>) -> Void) {
50
do {
51
try verifyParameters?(url, data, timeout)
52
let result = try mockCallFunction()
53
- completion(.success(result))
+ DispatchQueue.main.async {
+ completion(.success(result))
54
+ }
55
} catch {
- completion(.failure(error))
56
57
+ completion(.failure(error))
58
59
}
60
61
0 commit comments