Skip to content

Commit b8d780c

Browse files
MylesBorinsaddaleax
authored andcommitted
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: #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>
1 parent 2112b70 commit b8d780c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/parallel/test-npm-version.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict';
2+
require('../common');
3+
4+
const path = require('path');
5+
const assert = require('assert');
6+
7+
const npmPathPackageJson = path.resolve(
8+
__dirname,
9+
'..',
10+
'..',
11+
'deps',
12+
'npm',
13+
'package.json'
14+
);
15+
16+
const pkg = require(npmPathPackageJson);
17+
assert(pkg.version.match(/^\d+\.\d+\.\d+$/),
18+
`unexpected version number: ${pkg.version}`);

0 commit comments

Comments
 (0)