[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:
Tadeu Zagallo
2015-06-09 14:26:49 -07:00
parent 90439cec26
commit 6358e163a5
7 changed files with 97 additions and 27 deletions

View File

@@ -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