GitToTheHub commented on code in PR #1694:
URL: https://github.com/apache/cordova-ios/pull/1694#discussion_r3845134702
##########
tests/CordovaLibTests/CDVSceneDelegateTests.m:
##########
@@ -97,13 +97,14 @@ - (CDVFakeSceneConnectionOptions
*)connectionOptionsForURL:(NSURL *)url
- (void)testColdLaunchURLIsBufferedUntilPageDidLoad
{
NSURL *launchURL = [NSURL URLWithString:@"testscheme://path?foo=bar"];
+ UISceneSession *session = [[[UISceneSession class] alloc] init];
XCTNSNotificationExpectation *notFiredYet = [[XCTNSNotificationExpectation
alloc]
initWithName:CDVPluginHandleOpenURLNotification];
notFiredYet.inverted = YES;
[self.sceneDelegate scene:self.placeholderScene
- willConnectToSession:nil
+ willConnectToSession:session
options:[self connectionOptionsForURL:launchURL]];
Review Comment:
Since this is repeating 4 times this could be sort out in a method like
`setupSceneDelgateWithOptions:`? Also `[[[UISceneSession class] alloc] init]`
could be set directly to `willConnectToSession:` since the variable `session`
is not used elsewhere?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]