@@ -9,7 +9,6 @@ import "../jest/mockAPM";
9
9
import APM from "../modules/APM" ;
10
10
import sinon from "sinon" ;
11
11
12
- import IBGConstants from "../utils/InstabugConstants" ;
13
12
import IBGEventEmitter from "../utils/IBGEventEmitter" ;
14
13
15
14
describe ( "APM Module" , ( ) => {
@@ -24,8 +23,6 @@ describe("APM Module", () => {
24
23
const endUITrace = sinon . spy ( NativeModules . IBGAPM , "endUITrace" ) ;
25
24
26
25
beforeEach ( ( ) => {
27
- // setWillShowSurveyHandler.resetHistory();
28
- // setDidDismissSurveyHandler.resetHistory();
29
26
IBGEventEmitter . removeAllListeners ( ) ;
30
27
} ) ;
31
28
@@ -84,109 +81,4 @@ describe("APM Module", () => {
84
81
85
82
expect ( endUITrace . calledOnceWithExactly ( ) ) . toBe ( true ) ;
86
83
} ) ;
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
- // });
192
84
} ) ;
0 commit comments