mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-25 04:45:47 +08:00
[ReactNative] Revert async exports changes to MessageQueue + test
Summary: @public `[Bridge] Add support for JS async functions to RCT_EXPORT_METHOD` was imported but broke some internal code, reverting the `MessageQueue` that caused the issues and add a test, since the method is not used yet. Test Plan: Run the test o/
This commit is contained in:
@@ -69,4 +69,21 @@ RCT_EXPORT_METHOD(sendAppEvent:(NSString *)name body:(id)body)
|
||||
[_bridge.eventDispatcher sendAppEventWithName:name body:body];
|
||||
}
|
||||
|
||||
RCT_REMAP_METHOD(shouldResolve, shouldResolve_resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)
|
||||
{
|
||||
resolve(@1);
|
||||
}
|
||||
|
||||
RCT_REMAP_METHOD(shouldReject, shouldReject_resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject)
|
||||
{
|
||||
reject(nil);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(finish:(BOOL)success)
|
||||
{
|
||||
RCTAssert(success, @"RCTTestModule finished without success");
|
||||
[self markTestCompleted];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user