mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-13 07:45:10 +00:00
Merge pull request #344 from realm/sk-ios-93-fix
Fix disabling of RCTDevMenu for tests on iOS 9.3
This commit is contained in:
commit
08fa6ba90c
@ -34,18 +34,31 @@ extern NSMutableArray *RCTGetModuleClasses(void);
|
||||
- (void)setUp;
|
||||
@end
|
||||
|
||||
@interface RCTDevMenuDisabler : RCTDevMenu
|
||||
@end
|
||||
|
||||
@interface RealmReactTests : RealmJSTests
|
||||
@end
|
||||
|
||||
@interface RealmReactChromeTests : RealmReactTests
|
||||
@end
|
||||
|
||||
|
||||
@implementation RCTDevMenuDisabler
|
||||
|
||||
+ (void)load {
|
||||
// +[RCTDevMenu load] is guaranteed to have been called since it's the superclass.
|
||||
// We remove it since it interferes with us fully controlling the executor class.
|
||||
NSMutableArray *moduleClasses = RCTGetModuleClasses();
|
||||
[moduleClasses removeObject:[RCTDevMenu class]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation RealmReactTests
|
||||
|
||||
+ (void)load {
|
||||
NSMutableArray *moduleClasses = RCTGetModuleClasses();
|
||||
[moduleClasses removeObject:[RCTDevMenu class]];
|
||||
|
||||
RCTAddLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
|
||||
NSAssert(level < RCTLogLevelError, RCTFormatLog(nil, level, fileName, lineNumber, message));
|
||||
});
|
||||
@ -224,6 +237,7 @@ extern NSMutableArray *RCTGetModuleClasses(void);
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation RealmReactChromeTests
|
||||
|
||||
+ (Class)executorClass {
|
||||
|
Loading…
x
Reference in New Issue
Block a user