mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
respond to comments
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user