소스 검색

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]);