0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00
nodejs/test/parallel/test-npm-version.js
Myles Borins d9e98df01b
test: fix tests for npm 7.0.0
PR-URL: https://github.com/nodejs/node/pull/35631
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@github.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2020-10-14 10:36:46 -04:00

19 lines
351 B
JavaScript

'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}`);