Added tests for synchronous methods in native modules on iOS

Reviewed By: javache

Differential Revision: D4947631

fbshipit-source-id: d7e497c44602eb6e38896a00edb61639ab2b8cd4
This commit is contained in:
Alex Dvornikov
2017-04-27 11:49:50 -07:00
committed by Facebook Github Bot
parent db0c22192c
commit 971b083c6a
5 changed files with 155 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
@interface UIExplorerTestModule : NSObject <RCTBridgeModule>
@end
@implementation UIExplorerTestModule
RCT_EXPORT_MODULE(UIExplorerTestModule)
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(echoString:(NSString *)input)
{
return input;
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(methodThatReturnsNil)
{
return nil;
}
@end