Skip to content

Commit 3e96106

Browse files
author
AliAbdelfattah
authored
Merge pull request #338 from Instabug/specs/ios-crashes-module
Specs/ios crashes module
2 parents ed1f405 + 99f454d commit 3e96106

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

InstabugSample/ios/InstabugSampleTests/InstabugSampleTests.m

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,5 +518,21 @@ - (void) testgivenBoolean$setViewHierarchyEnabled_whenQuery_thenShouldCallNative
518518
XCTAssertTrue(IBGBugReporting.shouldCaptureViewHierarchy);
519519
}
520520

521+
/*
522+
+------------------------------------------------------------------------+
523+
| Crash Reporting Module |
524+
+------------------------------------------------------------------------+
525+
*/
526+
527+
- (void)testSetCrashReportingEnabled {
528+
id mock = OCMClassMock([Instabug class]);
529+
530+
[self.instabugBridge setCrashReportingEnabled:YES];
531+
XCTAssertTrue(IBGCrashReporting.enabled);
532+
533+
[self.instabugBridge setCrashReportingEnabled:NO];
534+
XCTAssertFalse(IBGCrashReporting.enabled);
535+
}
536+
521537

522538
@end

ios/RNInstabug/InstabugReactBridge.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,12 @@
119119

120120
- (void)setViewHirearchyEnabled:(BOOL)viewHirearchyEnabled;
121121

122+
/*
123+
+------------------------------------------------------------------------+
124+
| Crash Reporting Module |
125+
+------------------------------------------------------------------------+
126+
*/
127+
128+
- (void)setCrashReportingEnabled:(BOOL)enabledCrashReporter;
129+
122130
@end

0 commit comments

Comments
 (0)