Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 7cec964

Browse files
committed
added comment explaining why we want to skip app delegate for unit testing
1 parent 6ef927e commit 7cec964

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • packages/camera/camera/example/ios/Runner

packages/camera/camera/example/ios/Runner/main.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
int main(int argc, char *argv[]) {
1010
@autoreleasepool {
11+
// The setup logic in `AppDelegate::didFinishLaunchingWithOptions:` eventually sends camera
12+
// operations on the background queue, which would run concurrently with the tests cases during
13+
// unit tests, making the debugging process confusing. This setup is actually not necessary for
14+
// our unit tests, so here we want to skip the AppDelegate when running unit tests.
1115
BOOL isTesting = NSClassFromString(@"XCTestCase") != nil;
1216
return UIApplicationMain(argc, argv, nil,
1317
isTesting ? nil : NSStringFromClass([AppDelegate class]));

0 commit comments

Comments
 (0)