@@ -258,13 +258,13 @@ describe('hubConnection', function () {
258258 hubConnection . start ( ) . then ( function ( ) {
259259 return hubConnection . invoke ( 'InvokeWithString' , message ) ;
260260 } )
261- . then ( function ( ) {
262- return hubConnection . stop ( ) ;
263- } )
264- . catch ( function ( e ) {
265- fail ( e ) ;
266- done ( ) ;
267- } ) ;
261+ . then ( function ( ) {
262+ return hubConnection . stop ( ) ;
263+ } )
264+ . catch ( function ( e ) {
265+ fail ( e ) ;
266+ done ( ) ;
267+ } ) ;
268268 } ) ;
269269
270270 it ( 'closed with error if hub cannot be created' , function ( done ) {
@@ -315,31 +315,31 @@ describe('hubConnection', function () {
315315 hubConnection . start ( ) . then ( function ( ) {
316316 return hubConnection . invoke ( 'EchoComplexObject' , complexObject ) ;
317317 } )
318- . then ( function ( value ) {
319- if ( protocol . name === "messagepack" ) {
320- // msgpack creates a Buffer for byte arrays and jasmine fails to compare a Buffer
321- // and a Uint8Array even though Buffer instances are also Uint8Array instances
322- value . ByteArray = new Uint8Array ( value . ByteArray ) ;
323-
324- // GUIDs are serialized as raw type which is a string containing bytes which need to
325- // be extracted. Note that with msgpack5 the original bytes will be encoded with utf8
326- // and needs to be decoded. To not go into utf8 encoding intricacies the test uses values
327- // less than 0x80.
328- let guidBytes = [ ] ;
329- for ( let i = 0 ; i < value . GUID . length ; i ++ ) {
330- guidBytes . push ( value . GUID . charCodeAt ( i ) ) ;
331- }
332- value . GUID = new Uint8Array ( guidBytes ) ;
318+ . then ( function ( value ) {
319+ if ( protocol . name === "messagepack" ) {
320+ // msgpack creates a Buffer for byte arrays and jasmine fails to compare a Buffer
321+ // and a Uint8Array even though Buffer instances are also Uint8Array instances
322+ value . ByteArray = new Uint8Array ( value . ByteArray ) ;
323+
324+ // GUIDs are serialized as raw type which is a string containing bytes which need to
325+ // be extracted. Note that with msgpack5 the original bytes will be encoded with utf8
326+ // and needs to be decoded. To not go into utf8 encoding intricacies the test uses values
327+ // less than 0x80.
328+ let guidBytes = [ ] ;
329+ for ( let i = 0 ; i < value . GUID . length ; i ++ ) {
330+ guidBytes . push ( value . GUID . charCodeAt ( i ) ) ;
333331 }
334- expect ( value ) . toEqual ( complexObject ) ;
335- } )
336- . then ( function ( ) {
337- hubConnection . stop ( ) ;
338- } )
339- . catch ( function ( e ) {
340- fail ( e ) ;
341- done ( ) ;
342- } ) ;
332+ value . GUID = new Uint8Array ( guidBytes ) ;
333+ }
334+ expect ( value ) . toEqual ( complexObject ) ;
335+ } )
336+ . then ( function ( ) {
337+ hubConnection . stop ( ) ;
338+ } )
339+ . catch ( function ( e ) {
340+ fail ( e ) ;
341+ done ( ) ;
342+ } ) ;
343343 } ) ;
344344 } ) ;
345345 } ) ;
0 commit comments