File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const common = require ( '../common' ) ;
4
+ const assert = require ( 'assert' ) ;
5
+ const child_process = require ( 'child_process' ) ;
6
+ const path = require ( 'path' ) ;
7
+
8
+ const releaseReg = / ^ v \d + \. \d + \. \d + $ / ;
9
+
10
+ if ( ! releaseReg . test ( process . version ) ) {
11
+ common . skip ( 'This test is only for release builds' ) ;
12
+ }
13
+
14
+ {
15
+ // Verify that npm does not print out a warning when executed
16
+
17
+ const npmCli = path . join ( __dirname , '../../deps/npm/bin/npm-cli.js' ) ;
18
+ const npmExec = child_process . spawnSync ( process . execPath , [ npmCli ] ) ;
19
+ assert . strictEqual ( npmExec . status , 1 ) ;
20
+
21
+ const stderr = npmExec . stderr . toString ( ) ;
22
+ assert . strictEqual ( stderr . length , 0 , 'npm is not ready for this release ' +
23
+ 'and is going to print warnings to users:\n' + stderr ) ;
24
+ }
You can’t perform that action at this time.
0 commit comments