From cf544b74f5b4466b771597a44eb58080ba0954c7 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Mon, 16 Dec 2019 17:25:21 -0800 Subject: [PATCH] fix msg abbreviation --- src/common/connection.ts | 4 ++-- test/connection-test.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/connection.ts b/src/common/connection.ts index 223bd768..5b754e91 100644 --- a/src/common/connection.ts +++ b/src/common/connection.ts @@ -8,7 +8,7 @@ import {RippledError, DisconnectedError, NotConnectedError, RippledNotInitializedError} from './errors' export interface ConnectionOptions { - trace?: boolean | ((id: string, msg: string) => void) + trace?: boolean | ((id: string, message: string) => void) proxy?: string proxyAuthorization?: string authorization?: string @@ -46,7 +46,7 @@ class Connection extends EventEmitter { private _fee_ref: null|number = null private _connectionTimeout: number - private _trace: (id: string, msg: string) => void = () => {} + private _trace: (id: string, message: string) => void = () => {} constructor(url, options: ConnectionOptions = {}) { super() diff --git a/test/connection-test.ts b/test/connection-test.ts index 1f92f2da..2e24fc8f 100644 --- a/test/connection-test.ts +++ b/test/connection-test.ts @@ -47,7 +47,7 @@ describe('Connection', function() { it('as false', function() { const messages = []; - console.log = (id, msg) => messages.push([id, msg]); + console.log = (id, message) => messages.push([id, message]); const connection: any = new utils.common.Connection('url', {trace: false}); connection._ws = {send: function() {}}; connection._send(message1); @@ -57,7 +57,7 @@ describe('Connection', function() { it('as true', function() { const messages = []; - console.log = (id, msg) => messages.push([id, msg]); + console.log = (id, message) => messages.push([id, message]); const connection: any = new utils.common.Connection('url', {trace: true}); connection._ws = {send: function() {}}; connection._send(message1); @@ -68,7 +68,7 @@ describe('Connection', function() { it('as a function', function() { const messages = []; const connection: any = new utils.common.Connection('url', { - trace: (id, msg) => messages.push([id, msg]) + trace: (id, message) => messages.push([id, message]) }); connection._ws = {send: function() {}}; connection._send(message1);