Skip to content

Commit 61e639b

Browse files
test: add Node.js 10, 12 and 13 in the test matrix
uws is no longer maintained, and did not support Node.js >= 10. We now use a fork in order to support the newer versions of Node.js. It is maintained there: https://github.com/mmdevries/uws And can be installed with: `npm i github:mmdevries/uws#2.4.1` We could also try to support uWebSockets.js, but it does not have the same API as ws. The "engines" attribute has also been added in the package.json file, since we broke the support for Node.js 6 in the latest minor release. Source: https://github.com/mmdevries/uws Related: #583
1 parent a374471 commit 61e639b

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ sudo: false
22
language: node_js
33
node_js:
44
- "8"
5-
- "9"
5+
- "10"
6+
- "12"
7+
- "13"
68
git:
79
depth: 1
810
notifications:

package-lock.json

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"prettier": "^1.19.1",
4343
"s": "0.1.1",
4444
"superagent": "^3.8.1",
45-
"uws": "~9.14.0"
45+
"uws": "github:mmdevries/uws#2.4.1"
4646
},
4747
"scripts": {
4848
"lint": "eslint lib/ test/ *.js",
@@ -56,5 +56,8 @@
5656
},
5757
"files": [
5858
"lib/"
59-
]
59+
],
60+
"engines" : {
61+
"node" : ">=8.0.0"
62+
}
6063
}

test/server.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ var expect = require("expect.js");
1717
var request = require("superagent");
1818
var cookieMod = require("cookie");
1919

20-
// are we running on node < 4.4.3 ?
21-
var NODE_LT_443 = (function() {
22-
var parts = process.versions.node.split(".");
23-
return parts[0] < 4 || parts[1] < 4 || parts[2] < 3;
24-
})();
2520
// are we running uws wsEngine ?
2621
var UWS_ENGINE = process.env.EIO_WS_ENGINE === "uws";
2722

@@ -1769,7 +1764,6 @@ describe("server", function() {
17691764
});
17701765

17711766
it("should send and receive data with key and cert (polling)", function(done) {
1772-
if (UWS_ENGINE && NODE_LT_443) return done();
17731767
var srvOpts = {
17741768
key: fs.readFileSync("test/fixtures/server.key"),
17751769
cert: fs.readFileSync("test/fixtures/server.crt"),
@@ -1810,7 +1804,6 @@ describe("server", function() {
18101804
});
18111805

18121806
it("should send and receive data with ca when not requiring auth (polling)", function(done) {
1813-
if (UWS_ENGINE && NODE_LT_443) return done();
18141807
var srvOpts = {
18151808
key: fs.readFileSync("test/fixtures/server.key"),
18161809
cert: fs.readFileSync("test/fixtures/server.crt"),
@@ -1849,6 +1842,9 @@ describe("server", function() {
18491842
});
18501843

18511844
it("should send and receive data with key and cert (ws)", function(done) {
1845+
if (UWS_ENGINE) {
1846+
return this.skip();
1847+
}
18521848
var srvOpts = {
18531849
key: fs.readFileSync("test/fixtures/server.key"),
18541850
cert: fs.readFileSync("test/fixtures/server.crt"),
@@ -1889,7 +1885,6 @@ describe("server", function() {
18891885
});
18901886

18911887
it("should send and receive data with pfx (polling)", function(done) {
1892-
if (UWS_ENGINE && NODE_LT_443) return done();
18931888
var srvOpts = {
18941889
key: fs.readFileSync("test/fixtures/server.key"),
18951890
cert: fs.readFileSync("test/fixtures/server.crt"),
@@ -1929,7 +1924,9 @@ describe("server", function() {
19291924
});
19301925

19311926
it("should send and receive data with pfx (ws)", function(done) {
1932-
if (UWS_ENGINE && NODE_LT_443) return done();
1927+
if (UWS_ENGINE) {
1928+
return this.skip();
1929+
}
19331930
var srvOpts = {
19341931
key: fs.readFileSync("test/fixtures/server.key"),
19351932
cert: fs.readFileSync("test/fixtures/server.crt"),

0 commit comments

Comments
 (0)