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 @@ -137,7 +137,7 @@ describe('Instabug Module', () => {
137
137
await waitForExpect ( ( ) => expect ( NativeInstabug . reportScreenChange ) . toBeCalledTimes ( 2 ) ) ;
138
138
} ) ;
139
139
140
- it ( 'should call the native method init' , ( ) => {
140
+ it ( 'should call the native method init with optional parameters set ' , ( ) => {
141
141
const instabugConfig = {
142
142
token : 'some-token' ,
143
143
invocationEvents : [ Instabug . invocationEvent . floatingButton , Instabug . invocationEvent . shake ] ,
@@ -155,6 +155,22 @@ describe('Instabug Module', () => {
155
155
) ;
156
156
} ) ;
157
157
158
+ it ( 'should call the native method init with default optional parameters' , ( ) => {
159
+ const instabugConfig = {
160
+ token : 'some-token' ,
161
+ invocationEvents : [ Instabug . invocationEvent . floatingButton , Instabug . invocationEvent . shake ] ,
162
+ } ;
163
+ Instabug . init ( instabugConfig ) ;
164
+
165
+ expect ( NativeInstabug . init ) . toBeCalledTimes ( 1 ) ;
166
+ expect ( NativeInstabug . init ) . toBeCalledWith (
167
+ instabugConfig . token ,
168
+ instabugConfig . invocationEvents ,
169
+ '' ,
170
+ LogLevel . Error ,
171
+ ) ;
172
+ } ) ;
173
+
158
174
it ( 'should report the first screen on SDK initialization' , async ( ) => {
159
175
Instabug . init ( { token : 'some-token' } ) ;
160
176
You can’t perform that action at this time.
0 commit comments