File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
packages/react-native/ReactCommon/react/bridgeless/iostests Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -134,15 +134,25 @@ - (void)testDidReceiveErrorStack
134
134
stackFrame0[@" file" ] = @" file2.js" ;
135
135
[stack addObject: stackFrame1];
136
136
137
- [instanceDelegate instance: OCMClassMock ([RCTInstance class ])
138
- didReceiveJSErrorStack: stack
139
- message: @" message"
140
- exceptionId: 5
141
- isFatal: YES ];
137
+ [instanceDelegate instance: [OCMArg any ] didReceiveJSErrorStack: stack message: @" message" exceptionId: 5 isFatal: YES ];
142
138
143
139
OCMVerify (
144
140
OCMTimes (1 ),
145
141
[_mockHostDelegate host: _subject didReceiveJSErrorStack: stack message: @" message" exceptionId: 5 isFatal: YES ]);
146
142
}
147
143
144
+ - (void )testDidInitializeRuntime
145
+ {
146
+ id <RCTHostRuntimeDelegate> mockRuntimeDelegate = OCMProtocolMock (@protocol (RCTHostRuntimeDelegate));
147
+ _subject.runtimeDelegate = mockRuntimeDelegate;
148
+
149
+ auto hermesRuntime = facebook::hermes::makeHermesRuntime ();
150
+ facebook::jsi::Runtime *rt = hermesRuntime.get ();
151
+
152
+ id <RCTInstanceDelegate> instanceDelegate = (id <RCTInstanceDelegate>)_subject;
153
+ [instanceDelegate instance: [OCMArg any ] didInitializeRuntime: *rt];
154
+
155
+ OCMVerify (OCMTimes (1 ), [mockRuntimeDelegate host: _subject didInitializeRuntime: *rt]);
156
+ }
157
+
148
158
@end
You can’t perform that action at this time.
0 commit comments