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>
This commit is contained in:
parent
ed0da636b9
commit
2e613a9c30
18
test/parallel/test-npm-version.js
Normal file
18
test/parallel/test-npm-version.js
Normal file
@ -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}`);
|
Loading…
x
Reference in New Issue
Block a user