| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1cfa98c commit a03809d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,24 @@ | |||
| 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 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments