| @@ -22,6 +22,7 @@ const uninstall = new Uninstall(npm) |
|
|
| 22 |
22 |
t.afterEach(cb => { |
| 23 |
23 |
npm.globalDir = '' |
| 24 |
24 |
npm.prefix = '' |
|
25 |
+npm.localPrefix = '' |
| 25 |
26 |
npm.flatOptions.global = false |
| 26 |
27 |
npm.flatOptions.prefix = '' |
| 27 |
28 |
cb() |
| @@ -85,7 +86,7 @@ t.test('remove single installed lib', t => { |
|
|
| 85 |
86 |
const b = resolve(path, 'node_modules/b') |
| 86 |
87 |
t.ok(() => fs.statSync(b)) |
| 87 |
88 |
|
| 88 |
|
-npm.config.set('prefix', path) |
|
89 |
+npm.localPrefix = path |
| 89 |
90 |
|
| 90 |
91 |
uninstall.exec(['b'], err => { |
| 91 |
92 |
if (err) |
| @@ -148,7 +149,7 @@ t.test('remove multiple installed libs', t => { |
|
|
| 148 |
149 |
t.ok(() => fs.statSync(a)) |
| 149 |
150 |
t.ok(() => fs.statSync(b)) |
| 150 |
151 |
|
| 151 |
|
-npm.config.set('prefix', path) |
|
152 |
+npm.localPrefix = path |
| 152 |
153 |
|
| 153 |
154 |
uninstall.exec(['b'], err => { |
| 154 |
155 |
if (err) |
| @@ -196,7 +197,6 @@ t.test('no args global', t => { |
|
|
| 196 |
197 |
npm.localPrefix = resolve(path, 'projects', 'a') |
| 197 |
198 |
npm.globalDir = resolve(path, 'lib', 'node_modules') |
| 198 |
199 |
npm.config.set('global', true) |
| 199 |
|
-npm.config.set('prefix', path) |
| 200 |
200 |
|
| 201 |
201 |
const a = resolve(path, 'lib/node_modules/a') |
| 202 |
202 |
t.ok(() => fs.statSync(a)) |