@@ -95,7 +95,7 @@ describe('BleClient', () => {
9595 expect ( BluetoothLe . addListener ) . toHaveBeenCalledWith ( 'onEnabledChanged' , expect . any ( Function ) ) ;
9696 expect ( BluetoothLe . startEnabledNotifications ) . toHaveBeenCalledTimes ( 1 ) ;
9797 expect ( ( BleClient as unknown as BleClientWithPrivate ) . eventListeners . get ( 'onEnabledChanged' ) ) . toBe (
98- mockPluginListenerHandle ,
98+ mockPluginListenerHandle
9999 ) ;
100100 } ) ;
101101
@@ -120,7 +120,7 @@ describe('BleClient', () => {
120120
121121 await BleClient . startEnabledNotifications ( mockCallback ) ;
122122 expect ( ( BleClient as unknown as BleClientWithPrivate ) . eventListeners . get ( 'onEnabledChanged' ) ) . toBe (
123- mockPluginListenerHandle ,
123+ mockPluginListenerHandle
124124 ) ;
125125 await BleClient . stopEnabledNotifications ( ) ;
126126 expect ( mockPluginListenerHandle . remove ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -210,7 +210,7 @@ describe('BleClient', () => {
210210 ( BluetoothLe . addListener as jest . Mock ) . mockReturnValue ( mockPluginListenerHandle ) ;
211211 await BleClient . connect ( mockDevice . deviceId , mockDisconnectCallback ) ;
212212 expect ( ( BleClient as unknown as BleClientWithPrivate ) . eventListeners . get ( 'disconnected|123' ) ) . toBe (
213- mockPluginListenerHandle ,
213+ mockPluginListenerHandle
214214 ) ;
215215 expect ( BluetoothLe . connect ) . toHaveBeenCalledTimes ( 1 ) ;
216216 } ) ;
@@ -238,14 +238,14 @@ describe('BleClient', () => {
238238 } ) ;
239239
240240 it ( 'should run read' , async ( ) => {
241- ( BluetoothLe . read as jest . Mock ) . mockReturnValue ( { value : '00 05 c8 ' } ) ;
241+ ( BluetoothLe . read as jest . Mock ) . mockReturnValue ( { value : '0005c8 ' } ) ;
242242 const result = await BleClient . read ( mockDevice . deviceId , service , characteristic ) ;
243- expect ( result ) . toEqual ( hexStringToDataView ( '00 05 c8 ' ) ) ;
243+ expect ( result ) . toEqual ( hexStringToDataView ( '0005c8 ' ) ) ;
244244 expect ( BluetoothLe . read ) . toHaveBeenCalledWith ( { deviceId : mockDevice . deviceId , service, characteristic } ) ;
245245 } ) ;
246246
247247 it ( 'should run read with timeout' , async ( ) => {
248- ( BluetoothLe . read as jest . Mock ) . mockReturnValue ( { value : '00 05 c8 ' } ) ;
248+ ( BluetoothLe . read as jest . Mock ) . mockReturnValue ( { value : '0005c8 ' } ) ;
249249 await BleClient . read ( mockDevice . deviceId , service , characteristic , { timeout : 6000 } ) ;
250250 expect ( BluetoothLe . read ) . toHaveBeenCalledWith ( {
251251 deviceId : mockDevice . deviceId ,
@@ -276,7 +276,7 @@ describe('BleClient', () => {
276276 deviceId : mockDevice . deviceId ,
277277 service,
278278 characteristic,
279- value : '00 01 ' ,
279+ value : '0001 ' ,
280280 } ) ;
281281 } ) ;
282282
@@ -289,7 +289,7 @@ describe('BleClient', () => {
289289 deviceId : mockDevice . deviceId ,
290290 service,
291291 characteristic,
292- value : '03 04 05 06 07 ' ,
292+ value : '0304050607 ' ,
293293 } ) ;
294294 } ) ;
295295
@@ -300,7 +300,7 @@ describe('BleClient', () => {
300300 deviceId : mockDevice . deviceId ,
301301 service,
302302 characteristic,
303- value : '00 01 ' ,
303+ value : '0001 ' ,
304304 timeout : 6000 ,
305305 } ) ;
306306 } ) ;
@@ -325,7 +325,7 @@ describe('BleClient', () => {
325325 deviceId : mockDevice . deviceId ,
326326 service,
327327 characteristic,
328- value : '00 01 ' ,
328+ value : '0001 ' ,
329329 timeout : 6000 ,
330330 } ) ;
331331 } ) ;
@@ -369,7 +369,7 @@ describe('BleClient', () => {
369369 } ) ;
370370
371371 it ( 'should run readDescriptor with timeout' , async ( ) => {
372- ( BluetoothLe . readDescriptor as jest . Mock ) . mockReturnValue ( { value : '00 05 c8 ' } ) ;
372+ ( BluetoothLe . readDescriptor as jest . Mock ) . mockReturnValue ( { value : '0005c8 ' } ) ;
373373 const result = await BleClient . readDescriptor ( mockDevice . deviceId , service , characteristic , descriptor , {
374374 timeout : 6000 ,
375375 } ) ;
@@ -380,7 +380,7 @@ describe('BleClient', () => {
380380 descriptor,
381381 timeout : 6000 ,
382382 } ) ;
383- expect ( result ) . toEqual ( hexStringToDataView ( '00 05 c8 ' ) ) ;
383+ expect ( result ) . toEqual ( hexStringToDataView ( '0005c8 ' ) ) ;
384384 } ) ;
385385
386386 it ( 'should run writeDescriptor with timeout' , async ( ) => {
@@ -393,14 +393,14 @@ describe('BleClient', () => {
393393 numbersToDataView ( [ 0 , 1 ] ) ,
394394 {
395395 timeout : 6000 ,
396- } ,
396+ }
397397 ) ;
398398 expect ( BluetoothLe . writeDescriptor ) . toHaveBeenCalledWith ( {
399399 deviceId : mockDevice . deviceId ,
400400 service,
401401 characteristic,
402402 descriptor,
403- value : '00 01 ' ,
403+ value : '0001 ' ,
404404 timeout : 6000 ,
405405 } ) ;
406406 } ) ;
0 commit comments