Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure unit tests pass with any Node.js ABI version #120

Merged
merged 2 commits into from
May 22, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
vweevers marked this conversation as resolved.
Show resolved Hide resolved
- 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