11import { Message } from "protobufjs/light" ;
2- import { BrowserWebSocketAdapter } from "../../src/network" ;
32import {
3+ BrowserWebSocketAdapter ,
44 LeaderConnection ,
55 RosterWSConnection ,
66 setFactory ,
77 WebSocketConnection ,
8- } from "../../src/network/connection " ;
8+ } from "../../src/network" ;
99import { Roster , ServerIdentity } from "../../src/network/proto" ;
1010import { ROSTER } from "../support/conondes" ;
1111import TestWebSocket from "./websocket-test-adapter" ;
@@ -177,9 +177,15 @@ describe("WebSocketAdapter Tests with sendStream", () => {
177177 const msg = new Roster ( ) ;
178178
179179 conn . sendStream ( msg , Roster ) . subscribe ( {
180- complete : ( ) => { throw new Error ( "should not complete" ) ; } ,
181- error : ( ) => { throw new Error ( "should not get error" ) ; } ,
182- next : ( ) => { done ( ) ; } ,
180+ complete : ( ) => {
181+ throw new Error ( "should not complete" ) ;
182+ } ,
183+ error : ( ) => {
184+ throw new Error ( "should not get error" ) ;
185+ } ,
186+ next : ( ) => {
187+ done ( ) ;
188+ } ,
183189 } ) ;
184190 } ) ;
185191
@@ -190,12 +196,16 @@ describe("WebSocketAdapter Tests with sendStream", () => {
190196 const msg = new Roster ( ) ;
191197
192198 conn . sendStream ( msg , Roster ) . subscribe ( {
193- complete : ( ) => { throw new Error ( "should not complete" ) ; } ,
199+ complete : ( ) => {
200+ throw new Error ( "should not complete" ) ;
201+ } ,
194202 error : ( err : Error ) => {
195203 expect ( err ) . toEqual ( new Error ( "reason to close" ) ) ;
196204 done ( ) ;
197205 } ,
198- next : ( ) => { throw new Error ( "should not get value" ) ; } ,
206+ next : ( ) => {
207+ throw new Error ( "should not get value" ) ;
208+ } ,
199209 } ) ;
200210 } ) ;
201211
@@ -207,12 +217,16 @@ describe("WebSocketAdapter Tests with sendStream", () => {
207217 const msg = new Roster ( ) ;
208218
209219 conn . sendStream ( msg , Roster ) . subscribe ( {
210- complete : ( ) => { throw new Error ( "should not complete" ) ; } ,
220+ complete : ( ) => {
221+ throw new Error ( "should not complete" ) ;
222+ } ,
211223 error : ( err : Error ) => {
212224 expect ( err ) . toEqual ( new Error ( "timeout" ) ) ;
213225 done ( ) ;
214226 } ,
215- next : ( ) => { throw new Error ( "should not get value" ) ; } ,
227+ next : ( ) => {
228+ throw new Error ( "should not get value" ) ;
229+ } ,
216230 } ) ;
217231 } ) ;
218232
@@ -222,9 +236,13 @@ describe("WebSocketAdapter Tests with sendStream", () => {
222236 const conn = new WebSocketConnection ( "http://example.com" , "" ) ;
223237
224238 conn . sendStream ( new Roster ( ) , Roster ) . subscribe ( {
225- complete : ( ) => { throw new Error ( "shouldn't complete" ) ; } ,
239+ complete : ( ) => {
240+ throw new Error ( "shouldn't complete" ) ;
241+ } ,
226242 error : ( ) => done ( ) ,
227- next : ( ) => { throw new Error ( "should not get value" ) ; } ,
243+ next : ( ) => {
244+ throw new Error ( "should not get value" ) ;
245+ } ,
228246 } ) ;
229247 } ) ;
230248
0 commit comments