浏览代码

Fix flaky iOS unit tests

yogevbd 5 年前
父节点
当前提交
2cdf1ba31f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      lib/ios/ReactNativeNavigationTests/RNNCommandsHandlerTest.m

+ 4
- 0
lib/ios/ReactNativeNavigationTests/RNNCommandsHandlerTest.m 查看文件

@@ -292,6 +292,9 @@
292 292
 - (void)testSetStackRoot_callRenderTreeAndWaitOnce {
293 293
 	id vc1Mock = OCMPartialMock(_vc1);
294 294
 	id vc2Mock = OCMPartialMock(_vc2);
295
+	OCMStub([vc1Mock renderTreeAndWait:NO perform:[OCMArg any]]);
296
+	OCMStub([vc2Mock renderTreeAndWait:NO perform:[OCMArg any]]);
297
+	
295 298
 	NSArray* newViewControllers = @[vc1Mock, vc2Mock];
296 299
 	id classMock = OCMClassMock([RNNLayoutManager class]);
297 300
 	OCMStub(ClassMethod([classMock findComponentForId:@"vc1"])).andReturn(_nvc);
@@ -311,6 +314,7 @@
311 314
 	_vc2.options.animations.setStackRoot.waitForRender = [[Bool alloc] initWithBOOL:YES];
312 315
 	id vc1Mock = OCMPartialMock(_vc1);
313 316
 	id vc2Mock = OCMPartialMock(_vc2);
317
+	OCMStub([vc1Mock renderTreeAndWait:NO perform:[OCMArg any]]);
314 318
 	OCMStub([vc2Mock renderTreeAndWait:YES perform:[OCMArg any]]);
315 319
 	NSArray* newViewControllers = @[vc1Mock, vc2Mock];
316 320
 	id classMock = OCMClassMock([RNNLayoutManager class]);