@@ -364,6 +364,10 @@
Loading
364 364
            dispatchGroup.leave()
365 365
            return nil
366 366
        }
367 +
        dispatchGroup.wait()
368 +
        guard !errorOcurred else {
369 +
            return
370 +
        }
367 371
        dispatchGroup.enter()
368 372
        detectModerationLabels(image: image, onEvent: onEvent).continueWith {(task) -> Any? in
369 373
            guard task.error == nil else {
@@ -375,6 +379,7 @@
Loading
375 379
                dispatchGroup.leave()
376 380
                return nil
377 381
            }
382 +
378 383
            guard let result = task.result else {
379 384
                onEvent(.failed(.unknown(AWSRekognitionErrorMessage.noResultFound.errorDescription,
380 385
                                         AWSRekognitionErrorMessage.noResultFound.recoverySuggestion)))
@@ -382,6 +387,7 @@
Loading
382 387
                dispatchGroup.leave()
383 388
                return nil
384 389
            }
390 +
385 391
            guard let moderationRekognitionLabels = result.moderationLabels else {
386 392
                onEvent(.failed(.network(AWSRekognitionErrorMessage.noResultFound.errorDescription,
387 393
                                         AWSRekognitionErrorMessage.noResultFound.recoverySuggestion)))
@@ -389,13 +395,15 @@
Loading
389 395
                dispatchGroup.leave()
390 396
                return nil
391 397
            }
398 +
392 399
            unsafeContent = !moderationRekognitionLabels.isEmpty
393 400
            dispatchGroup.leave()
394 401
            return nil
395 402
        }
396 403
        dispatchGroup.wait()
404 +
397 405
        if !errorOcurred {
398 -
        onEvent(.completed(IdentifyLabelsResult(labels: allLabels, unsafeContent: unsafeContent)))
406 +
            onEvent(.completed(IdentifyLabelsResult(labels: allLabels, unsafeContent: unsafeContent)))
399 407
        }
400 408
    }
401 409
}

@@ -332,7 +332,6 @@
Loading
332 332
        }
333 333
334 334
        let errorReceived = expectation(description: "Error should be returned")
335 -
        errorReceived.expectedFulfillmentCount = 2
336 335
337 336
        predictionsService.detectLabels(image: url, type: .all) { event in
338 337
            switch event {
Files Coverage
Amplify 45.75%
AmplifyPlugins 68.32%
AmplifyTestApp 44.44%
AmplifyTestCommon 25.61%
AmplifyTests 91.31%
Project Totals (874 files) 66.86%
20200
Predictions_plugin_unit_test
20204
Predictions_plugin_unit_test
20201
Auth_plugin_unit_test
20202
build_test_amplify
20206
DataStore_plugin_unit_test
20205
Storage_plugin_unit_test
20207
Analytics_plugin_unit_test
20199
API_plugin_unit_test

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading