diff --git a/packages/react-native/ReactCommon/react/bridgeless/iostests/RCTHostTests.mm b/packages/react-native/ReactCommon/react/bridgeless/iostests/RCTHostTests.mm index b3a7a1fb04e89e..606d2d9dabd1f1 100644 --- a/packages/react-native/ReactCommon/react/bridgeless/iostests/RCTHostTests.mm +++ b/packages/react-native/ReactCommon/react/bridgeless/iostests/RCTHostTests.mm @@ -134,15 +134,25 @@ - (void)testDidReceiveErrorStack stackFrame0[@"file"] = @"file2.js"; [stack addObject:stackFrame1]; - [instanceDelegate instance:OCMClassMock([RCTInstance class]) - didReceiveJSErrorStack:stack - message:@"message" - exceptionId:5 - isFatal:YES]; + [instanceDelegate instance:[OCMArg any] didReceiveJSErrorStack:stack message:@"message" exceptionId:5 isFatal:YES]; OCMVerify( OCMTimes(1), [_mockHostDelegate host:_subject didReceiveJSErrorStack:stack message:@"message" exceptionId:5 isFatal:YES]); } +- (void)testDidInitializeRuntime +{ + id mockRuntimeDelegate = OCMProtocolMock(@protocol(RCTHostRuntimeDelegate)); + _subject.runtimeDelegate = mockRuntimeDelegate; + + auto hermesRuntime = facebook::hermes::makeHermesRuntime(); + facebook::jsi::Runtime *rt = hermesRuntime.get(); + + id instanceDelegate = (id)_subject; + [instanceDelegate instance:[OCMArg any] didInitializeRuntime:*rt]; + + OCMVerify(OCMTimes(1), [mockRuntimeDelegate host:_subject didInitializeRuntime:*rt]); +} + @end