File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ describe('Instabug Module', () => {
166
166
await waitForExpect ( ( ) => expect ( NativeInstabug . reportScreenChange ) . toBeCalledTimes ( 2 ) ) ;
167
167
} ) ;
168
168
169
- it ( 'should call the native method init' , ( ) => {
169
+ it ( 'should call the native method init with optional parameters set ' , ( ) => {
170
170
const instabugConfig = {
171
171
token : 'some-token' ,
172
172
invocationEvents : [ InvocationEvent . floatingButton , InvocationEvent . shake ] ,
@@ -184,6 +184,22 @@ describe('Instabug Module', () => {
184
184
) ;
185
185
} ) ;
186
186
187
+ it ( 'should call the native method init with default optional parameters' , ( ) => {
188
+ const instabugConfig = {
189
+ token : 'some-token' ,
190
+ invocationEvents : [ Instabug . invocationEvent . floatingButton , Instabug . invocationEvent . shake ] ,
191
+ } ;
192
+ Instabug . init ( instabugConfig ) ;
193
+
194
+ expect ( NativeInstabug . init ) . toBeCalledTimes ( 1 ) ;
195
+ expect ( NativeInstabug . init ) . toBeCalledWith (
196
+ instabugConfig . token ,
197
+ instabugConfig . invocationEvents ,
198
+ '' ,
199
+ LogLevel . Error ,
200
+ ) ;
201
+ } ) ;
202
+
187
203
it ( 'should report the first screen on SDK initialization' , async ( ) => {
188
204
Instabug . init ( {
189
205
token : 'some-token' ,
You can’t perform that action at this time.
0 commit comments