Skip to content

Commit

Permalink
Fix JS Test
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBuggedYRN committed Mar 16, 2023
1 parent ad6488f commit d21024c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/modules/BugReporting.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,18 @@ describe('Testing BugReporting Module', () => {

it('should call the native method setOnDismissHandler with a function', () => {
const callback = jest.fn();
BugReporting.onSDKDismissedHandler(callback);
BugReporting.onDismissHandler(callback);

expect(NativeBugReporting.setOnDismissHandler).toBeCalledTimes(1);
expect(NativeBugReporting.setOnDismissHandler).toBeCalledWith(callback);
});

it('should invoke callback on emitting the event IBGpostInvocationHandler', () => {
const dismissType = 'cancel';
const reportType = 'bug';
const dismissType = Instabug.dismissType.cancel;
const reportType = BugReporting.reportType.bug;
const callback = jest.fn();

BugReporting.onSDKDismissedHandler(callback);
BugReporting.onDismissHandler(callback);
emitter.emit(NativeEvents.ON_DISMISS_HANDLER, {
dismissType: dismissType,
reportType: reportType,
Expand Down

0 comments on commit d21024c

Please sign in to comment.