respond to comments

This commit is contained in:
Fred K. Schott
2019-11-04 19:20:34 -08:00
parent 2dbad40a34
commit 6692fbeed4
3 changed files with 9 additions and 14 deletions

View File

@@ -48,17 +48,12 @@ function createLedgerResponse(request, response) {
return JSON.stringify(newResponse);
}
interface CustomWebSocketServer extends WebSocketServer, EventEmitter2 {
expectedRequests: any
expect: any
config: any
socket: any
onAny: any
event: any
}
// We mock out WebSocketServer in these tests and add a lot of custom
// properties not defined on the normal WebSocketServer object.
type MockedWebSocketServer = any;
export function createMockRippled(port) {
const mock = new WebSocketServer({ port: port }) as CustomWebSocketServer;
const mock = new WebSocketServer({ port: port }) as MockedWebSocketServer;
_.assign(mock, EventEmitter2.prototype);
const close = mock.close;