diff --git a/Examples/UIExplorer/LayoutEventsExample.js b/Examples/UIExplorer/LayoutEventsExample.js index 6aec6257e..c57c4e5f2 100644 --- a/Examples/UIExplorer/LayoutEventsExample.js +++ b/Examples/UIExplorer/LayoutEventsExample.js @@ -49,8 +49,7 @@ var LayoutEventExample = React.createClass({ () => { console.log('layout animation done.'); this.addWrapText(); - }, - (error) => { throw new Error(JSON.stringify(error)); } + } ); this.setState({ viewStyle: { diff --git a/Examples/UIExplorer/UIExplorerIntegrationTests/IntegrationTests.m b/Examples/UIExplorer/UIExplorerIntegrationTests/IntegrationTests.m index 78e6c8265..85f73a314 100644 --- a/Examples/UIExplorer/UIExplorerIntegrationTests/IntegrationTests.m +++ b/Examples/UIExplorer/UIExplorerIntegrationTests/IntegrationTests.m @@ -26,11 +26,11 @@ - (void)setUp { #if __LP64__ - RCTAssert(false, @"Tests should be run on 32-bit device simulators (e.g. iPhone 5)"); + RCTAssert(NO, @"Tests should be run on 32-bit device simulators (e.g. iPhone 5)"); #endif NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion]; - RCTAssert(version.majorVersion == 8 || version.minorVersion == 3, @"Tests should be run on iOS 8.3, found %zd.%zd.%zd", version.majorVersion, version.minorVersion, version.patchVersion); + RCTAssert(version.majorVersion == 8 || version.minorVersion >= 3, @"Tests should be run on iOS 8.3+, found %zd.%zd.%zd", version.majorVersion, version.minorVersion, version.patchVersion); _runner = RCTInitRunnerForApp(@"Examples/UIExplorer/UIExplorerIntegrationTests/js/IntegrationTestsApp", nil); } diff --git a/Examples/UIExplorer/UIExplorerIntegrationTests/UIExplorerSnapshotTests.m b/Examples/UIExplorer/UIExplorerIntegrationTests/UIExplorerSnapshotTests.m index 1eb3110ec..cb5d1771f 100644 --- a/Examples/UIExplorer/UIExplorerIntegrationTests/UIExplorerSnapshotTests.m +++ b/Examples/UIExplorer/UIExplorerIntegrationTests/UIExplorerSnapshotTests.m @@ -32,11 +32,12 @@ - (void)setUp { -#ifdef __LP64__ - RCTAssert(!__LP64__, @"Snapshot tests should be run on 32-bit device simulators (e.g. iPhone 5)"); +#if __LP64__ + RCTAssert(NO, @"Tests should be run on 32-bit device simulators (e.g. iPhone 5)"); #endif - NSString *version = [[UIDevice currentDevice] systemVersion]; - RCTAssert([version isEqualToString:@"8.3"], @"Snapshot tests should be run on iOS 8.3, found %@", version); + + NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion]; + RCTAssert(version.majorVersion == 8 || version.minorVersion >= 3, @"Snapshot tests should be run on iOS 8.3+, found %zd.%zd.%zd", version.majorVersion, version.minorVersion, version.patchVersion); _runner = RCTInitRunnerForApp(@"Examples/UIExplorer/UIExplorerApp.ios", nil); _runner.recordMode = NO; } diff --git a/Examples/UIExplorer/UIExplorerIntegrationTests/js/LayoutEventsTest.js b/Examples/UIExplorer/UIExplorerIntegrationTests/js/LayoutEventsTest.js index 0e16555f0..0333baf6c 100644 --- a/Examples/UIExplorer/UIExplorerIntegrationTests/js/LayoutEventsTest.js +++ b/Examples/UIExplorer/UIExplorerIntegrationTests/js/LayoutEventsTest.js @@ -51,8 +51,7 @@ var LayoutEventsTest = React.createClass({ () => { debug('layout animation done.'); this.checkLayout(this.addWrapText); - }, - (error) => { throw new Error(JSON.stringify(error)); } + } ); this.setState({viewStyle: {margin: 60}}); }, diff --git a/Examples/UIExplorer/UIExplorerUnitTests/RCTBridgeTests.m b/Examples/UIExplorer/UIExplorerUnitTests/RCTBridgeTests.m index 60f41747b..cca4fb016 100644 --- a/Examples/UIExplorer/UIExplorerUnitTests/RCTBridgeTests.m +++ b/Examples/UIExplorer/UIExplorerUnitTests/RCTBridgeTests.m @@ -170,7 +170,7 @@ RCT_EXPORT_MODULE(TestModule) } RCT_EXPORT_METHOD(testMethod:(NSInteger)integer - number:(NSNumber *)number + number:(nonnull NSNumber *)number string:(NSString *)string dictionary:(NSDictionary *)dict callback:(RCTResponseSenderBlock)callback) diff --git a/Libraries/Animation/LayoutAnimation.js b/Libraries/Animation/LayoutAnimation.js index d435f431f..e0e0fdae4 100644 --- a/Libraries/Animation/LayoutAnimation.js +++ b/Libraries/Animation/LayoutAnimation.js @@ -69,9 +69,11 @@ type Config = { delete?: Anim; } -function configureNext(config: Config, onAnimationDidEnd?: Function, onError?: Function) { +function configureNext(config: Config, onAnimationDidEnd?: Function) { configChecker({config}, 'config', 'LayoutAnimation.configureNext'); - RCTUIManager.configureNextLayoutAnimation(config, onAnimationDidEnd, onError); + RCTUIManager.configureNextLayoutAnimation( + config, onAnimationDidEnd || function() {}, function() { /* unused */ } + ); } function create(duration: number, type, creationProp): Config { diff --git a/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimers.js b/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimers.js index 72e75f813..f6a8bddc7 100644 --- a/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimers.js +++ b/Libraries/JavaScriptAppEngine/System/JSTimers/JSTimers.js @@ -47,7 +47,7 @@ var JSTimers = { return func.apply(undefined, args); }; JSTimersExecution.types[freeIndex] = JSTimersExecution.Type.setTimeout; - RCTTiming.createTimer(newID, duration, Date.now(), /** recurring */ false); + RCTTiming.createTimer(newID, duration || 0, Date.now(), /** recurring */ false); return newID; }, @@ -63,7 +63,7 @@ var JSTimers = { return func.apply(undefined, args); }; JSTimersExecution.types[freeIndex] = JSTimersExecution.Type.setInterval; - RCTTiming.createTimer(newID, duration, Date.now(), /** recurring */ true); + RCTTiming.createTimer(newID, duration || 0, Date.now(), /** recurring */ true); return newID; },