diff options
author | Myles Borins <mylesborins@google.com> | 2019-01-16 13:32:01 -0500 |
---|---|---|
committer | Myles Borins <myles.borins@gmail.com> | 2019-01-18 12:09:05 -0500 |
commit | 2e613a9c301165d121b19b86e382860323abc22f (patch) | |
tree | bca6c68cfb0cdf63d04e7d252d721792d842252b /test | |
parent | ed0da636b9bfef614f412b2935add832eda8d778 (diff) | |
download | android-node-v8-2e613a9c301165d121b19b86e382860323abc22f.tar.gz android-node-v8-2e613a9c301165d121b19b86e382860323abc22f.tar.bz2 android-node-v8-2e613a9c301165d121b19b86e382860323abc22f.zip |
test: ensure npm version is not release candidate
v11.6.0 ended up shipping with an npm version `6.5.0-next.0`.
This test should avoid it happening in the future.
PR-URL: https://github.com/nodejs/node/pull/25538
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-npm-version.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/parallel/test-npm-version.js b/test/parallel/test-npm-version.js new file mode 100644 index 0000000000..aa4bb77ac8 --- /dev/null +++ b/test/parallel/test-npm-version.js @@ -0,0 +1,18 @@ +'use strict'; +require('../common'); + +const path = require('path'); +const assert = require('assert'); + +const npmPathPackageJson = path.resolve( + __dirname, + '..', + '..', + 'deps', + 'npm', + 'package.json' +); + +const pkg = require(npmPathPackageJson); +assert(pkg.version.match(/^\d+\.\d+\.\d+$/), + `unexpected version number: ${pkg.version}`); |