diff --git a/package-lock.json b/package-lock.json index 013d300f..e6c2b38a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4758,7 +4758,7 @@ }, "onetime": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true }, @@ -4900,7 +4900,7 @@ }, "onetime": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true }, @@ -7390,9 +7390,9 @@ } }, "typescript": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", - "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", + "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", "dev": true }, "uglify-es": { @@ -7407,7 +7407,7 @@ "dependencies": { "commander": { "version": "2.14.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.14.1.tgz", "integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==", "dev": true }, diff --git a/package.json b/package.json index 981ba646..fee1d6c9 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "rollup-plugin-typescript2": "^0.23.0", "tslib": "^1.10.0", "tslint": "^5.19.0", - "typescript": "^3.5.3", + "typescript": "^3.7.5", "uglify-es": "^3.3.10", "ws": "^6.2.1" }, diff --git a/test/test.js b/test/test.js index b1ac5f2f..32439e23 100644 --- a/test/test.js +++ b/test/test.js @@ -560,7 +560,7 @@ test.cb('connect, send, receive, reconnect', t => { }); test.cb('immediately-failed connection should not timeout', t => { - const ws = new ReconnectingWebSocket('ws://thiswillfail.com', null, { + const ws = new ReconnectingWebSocket('ws://255.255.255.255', null, { maxRetries: 2, connectionTimeout: 500, }); @@ -570,7 +570,7 @@ test.cb('immediately-failed connection should not timeout', t => { t.fail(); } if (ws.retryCount === 2) { - setTimeout(() => t.end(), 1500); + setTimeout(() => t.end(), 500); } if (ws.retryCount > 2) { t.fail(); @@ -579,9 +579,9 @@ test.cb('immediately-failed connection should not timeout', t => { }); test.cb('immediately-failed connection with 0 maxRetries must not retry', t => { - const ws = new ReconnectingWebSocket('ws://thiswillfail.com', [], { + const ws = new ReconnectingWebSocket('ws://255.255.255.255', [], { maxRetries: 0, - connectionTimeout: 500, + connectionTimeout: 2000, minReconnectionDelay: 100, maxReconnectionDelay: 200, }); @@ -597,7 +597,7 @@ test.cb('immediately-failed connection with 0 maxRetries must not retry', t => { } setTimeout(() => { t.end(); - }, 500); + }, 2100); }); }); @@ -771,7 +771,7 @@ test.cb('closing from the other side should allow to keep closed', t => { }); test.cb('reconnection delay grow factor', t => { - const ws = new ReconnectingWebSocket('wss://bad.url', [], { + const ws = new ReconnectingWebSocket('wss://255.255.255.255', [], { minReconnectionDelay: 100, maxReconnectionDelay: 1000, reconnectionDelayGrowFactor: 2,