mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-19 19:55:51 +00:00
fix msg abbreviation
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user