Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit c23deb6

Browse files
committed
pr clean-up
1 parent b4972cf commit c23deb6

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

client-ts/Microsoft.AspNetCore.SignalR.Client.TS.Tests/HubConnection.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { IConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/IConnection"
55
import { HubConnection } from "../Microsoft.AspNetCore.SignalR.Client.TS/HubConnection"
66
import { DataReceived, ConnectionClosed } from "../Microsoft.AspNetCore.SignalR.Client.TS/Common"
7-
import { TransportType, ITransport, TransferMode, LongPollingTransport } from "../Microsoft.AspNetCore.SignalR.Client.TS/Transports"
7+
import { TransportType, ITransport, TransferMode } from "../Microsoft.AspNetCore.SignalR.Client.TS/Transports"
88
import { Observer } from "../Microsoft.AspNetCore.SignalR.Client.TS/Observable"
99
import { TextMessageFormat } from "../Microsoft.AspNetCore.SignalR.Client.TS/Formatters"
1010
import { ILogger, LogLevel } from "../Microsoft.AspNetCore.SignalR.Client.TS/ILogger"

client-ts/Microsoft.AspNetCore.SignalR.Test.Server/wwwroot/js/hubConnectionTests.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)