aboutsummaryrefslogtreecommitdiffstats
path: root/main/npm/smoke-tests-npm-location.patch
blob: 79f96758faee904c848dd3ef9160dbe4f52f9b8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Allow to specify custom npm location for smoke-tests, so we can test npm
without development dependencies involved.

--- a/smoke-tests/index.js
+++ b/smoke-tests/index.js
@@ -29,7 +29,7 @@
 })
 const localPrefix = resolve(path, 'project')
 const userconfigLocation = resolve(path, '.npmrc')
-const npmLocation = resolve(__dirname, '..')
+const npmLocation = resolve(__dirname, process.env.NPM_LOCATION || '..')
 const cacheLocation = resolve(path, 'cache')
 const binLocation = resolve(path, 'bin')
 const env = {
@@ -57,7 +57,7 @@
   t.equal(pkg.version, '1.0.0', 'should have expected generated version')
 })
 
-t.test('npm (no args)', async t => {
+t.skip('npm (no args)', async t => {
   const cmd = `"${process.execPath}" "${npmLocation}" --no-audit --no-update-notifier`
   const cmdRes = await execAsync(cmd, { cwd: localPrefix, env })
     .catch(err => {