Skip to content

Commit

Permalink
Ensure unit tests pass with any Node.js ABI version
Browse files Browse the repository at this point in the history
Add Node.js 12 and 14 to CI environment

Pin to ABI 64, as supported by 'a-native-module'

Remove 'verify-travis-appveyor' dependency as it does not
support Node.js 14+
  • Loading branch information
lovell committed May 22, 2020
1 parent 5deb710 commit 2ee64dd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ node_js:
- 6
- 8
- 10
- 12
- 14
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ version: "{build}"
environment:
# Test against these versions of Node.js
matrix:
- nodejs_version: "14"
- nodejs_version: "12"
- nodejs_version: "10"
- nodejs_version: "8"
- nodejs_version: "6"
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "5.3.4",
"description": "A command line tool to easily install prebuilt binaries for multiple version of node/iojs on a specific platform",
"scripts": {
"test": "verify-travis-appveyor && tape test/*-test.js && npm run lint",
"test": "tape test/*-test.js && npm run lint",
"lint": "standard"
},
"keywords": [
Expand Down Expand Up @@ -40,8 +40,7 @@
"nock": "^10.0.6",
"rimraf": "^2.5.2",
"standard": "^13.0.2",
"tape": "^4.5.1",
"verify-travis-appveyor": "^3.0.1"
"tape": "^4.5.1"
},
"bin": "./bin.js",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions test/asset-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ function getOpts () {
return {
pkg: require('a-native-module/package'),
runtime: 'node',
abi: 64,
platform: process.platform,
arch: process.arch,
path: __dirname,
Expand Down
5 changes: 3 additions & 2 deletions test/download-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ test('existing host but invalid url should fail', function (t) {
var cachedPrebuild = util.cachedPrebuild(downloadUrl)

var server = http.createServer(function (req, res) {
t.equal(req.url, '/prebuilds/woohooo-' + process.versions.modules, 'correct url')
t.equal(req.url, '/prebuilds/woohooo-' + opts.abi, 'correct url')
res.statusCode = 404
res.end()
}).listen(8888, function () {
Expand Down Expand Up @@ -180,7 +180,7 @@ test('error during download should fail with no dangling temp file', function (t
}

var server = http.createServer(function (req, res) {
t.equal(req.url, '/prebuilds/woohooo-' + process.versions.modules, 'correct url')
t.equal(req.url, '/prebuilds/woohooo-' + opts.abi, 'correct url')
res.statusCode = 200
res.write('yep') // simulates hanging request
}).listen(8889, function () {
Expand Down Expand Up @@ -221,6 +221,7 @@ function getOpts () {
return {
pkg: require('a-native-module/package'),
runtime: 'node',
abi: 64,
platform: process.platform,
arch: process.arch,
path: __dirname,
Expand Down

0 comments on commit 2ee64dd

Please sign in to comment.