@@ -9,7 +9,6 @@ import "../jest/mockAPM";
99import APM from "../modules/APM" ;
1010import sinon from "sinon" ;
1111
12- import IBGConstants from "../utils/InstabugConstants" ;
1312import IBGEventEmitter from "../utils/IBGEventEmitter" ;
1413
1514describe ( "APM Module" , ( ) => {
@@ -24,8 +23,6 @@ describe("APM Module", () => {
2423 const endUITrace = sinon . spy ( NativeModules . IBGAPM , "endUITrace" ) ;
2524
2625 beforeEach ( ( ) => {
27- // setWillShowSurveyHandler.resetHistory();
28- // setDidDismissSurveyHandler.resetHistory();
2926 IBGEventEmitter . removeAllListeners ( ) ;
3027 } ) ;
3128
@@ -84,109 +81,4 @@ describe("APM Module", () => {
8481
8582 expect ( endUITrace . calledOnceWithExactly ( ) ) . toBe ( true ) ;
8683 } ) ;
87-
88- // it("should call the native method setAppStoreURL", () => {
89- // Surveys.setAppStoreURL("URL");
90-
91- // expect(setAppStoreURL.calledOnceWithExactly("URL")).toBe(true);
92- // });
93-
94- // it("should call the native method showSurveysIfAvailable", () => {
95- // Surveys.showSurveyIfAvailable();
96-
97- // expect(showSurveysIfAvailable.calledOnce).toBe(true);
98- // });
99-
100- // it("should call the native method setThresholdForReshowingSurveyAfterDismiss", () => {
101- // const sessionCount = 2;
102- // const daysCount = 3;
103- // Surveys.setThresholdForReshowingSurveyAfterDismiss(sessionCount, daysCount);
104-
105- // expect(
106- // setThresholdForReshowingSurveyAfterDismiss.calledOnceWithExactly(
107- // sessionCount,
108- // daysCount
109- // )
110- // ).toBe(true);
111- // });
112-
113- // it("should call the native method getAvailableSurveys", () => {
114- // const callback = jest.fn();
115- // Surveys.getAvailableSurveys(callback);
116-
117- // expect(getAvailableSurveys.calledOnceWithExactly(callback)).toBe(true);
118- // });
119-
120- // it("should call the native method setAutoShowingSurveysEnabled", () => {
121- // Surveys.setAutoShowingEnabled(true);
122-
123- // expect(setAutoShowingSurveysEnabled.calledOnceWithExactly(true)).toBe(true);
124- // });
125-
126- // it("should call the native method setWillShowSurveyHandler with a function", () => {
127- // const callback = jest.fn();
128- // Surveys.setOnShowHandler(callback);
129-
130- // expect(setWillShowSurveyHandler.calledOnceWithExactly(callback)).toBe(true);
131- // });
132-
133- // it("should invoke callback on emitting the event IBGWillShowSurvey", () => {
134- // const callback = jest.fn();
135- // Surveys.setOnShowHandler(callback);
136- // IBGEventEmitter.emit(IBGConstants.WILL_SHOW_SURVEY_HANDLER);
137-
138- // expect(
139- // IBGEventEmitter.getListeners(IBGConstants.WILL_SHOW_SURVEY_HANDLER).length
140- // ).toEqual(1);
141- // expect(callback).toHaveBeenCalled();
142- // });
143-
144- // it("should call the native method setDidDismissSurveyHandler with a function", () => {
145- // const callback = jest.fn();
146- // Surveys.setOnDismissHandler(callback);
147-
148- // expect(setDidDismissSurveyHandler.calledOnceWithExactly(callback)).toBe(
149- // true
150- // );
151- // });
152-
153- // it("should invoke callback on emitting the event IBGDidDismissSurvey", () => {
154- // const callback = jest.fn();
155- // Surveys.setOnDismissHandler(callback);
156- // IBGEventEmitter.emit(IBGConstants.DID_DISMISS_SURVEY_HANDLER);
157-
158- // expect(
159- // IBGEventEmitter.getListeners(IBGConstants.DID_DISMISS_SURVEY_HANDLER)
160- // .length
161- // ).toEqual(1);
162- // expect(callback).toHaveBeenCalled();
163- // });
164-
165- // it("should call the native method showSurveyWithToken", () => {
166- // const surveyToken = "HEU128JD";
167- // Surveys.showSurvey(surveyToken);
168-
169- // expect(showSurveyWithToken.calledOnceWithExactly(surveyToken)).toBe(true);
170- // });
171-
172- // it("should call the native method hasRespondedToSurveyWithToken", done => {
173- // const callback = hasResponded => {
174- // expect(hasResponded).toBe(true);
175- // done();
176- // };
177- // const surveyToken = "HEU128JD";
178- // Surveys.hasRespondedToSurvey(surveyToken, callback);
179-
180- // expect(
181- // hasRespondedToSurveyWithToken.calledOnceWithExactly(surveyToken, callback)
182- // ).toBe(true);
183- // });
184-
185- // it("should call the native method setShouldShowSurveysWelcomeScreen", () => {
186- // Surveys.setShouldShowWelcomeScreen(true);
187-
188- // expect(setShouldShowSurveysWelcomeScreen.calledOnceWithExactly(true)).toBe(
189- // true
190- // );
191- // });
19284} ) ;
0 commit comments