Skip to content

Commit

Permalink
test: fix nightly tests to properly skip prerelease node versions >=18
Browse files Browse the repository at this point in the history
This is a follow-on to #3031 to handle testing of Node.js nightly
builds. These have a prerelease version, e.g.
"v20.0.0-nightly202211186f9175deaa", and therefore need the
includePrelease semver option for gte comparison.

Refs: #3031
  • Loading branch information
trentm committed Nov 18, 2022
1 parent 4d52d72 commit bed0a8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/_is_restify_incompat.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function isRestifyIncompat () {
const restifyVer = require('restify/package.json').version
const msg = `restify@${restifyVer} is incompatible with node@${nodeVer}`

if (semver.satisfies(restifyVer, '<10.0.0') && semver.satisfies(nodeVer, '>=18.0.0')) {
if (semver.satisfies(restifyVer, '<10.0.0') && semver.satisfies(nodeVer, '>=18.0.0', { includePrerelease: true })) {
return msg
}
if (semver.satisfies(restifyVer, '>=9.0.0') && semver.satisfies(nodeVer, '<14.18.0')) {
Expand Down

0 comments on commit bed0a8b

Please sign in to comment.