|
1 | 1 | const t = require('tap') |
2 | 2 | const requireInject = require('require-inject') |
| 3 | +const path = require('path') |
3 | 4 |
|
4 | 5 | const usageUtil = () => 'usage instructions' |
5 | 6 |
|
@@ -95,7 +96,7 @@ t.test('cache clean (force)', t => { |
95 | 96 |
|
96 | 97 | cache(['clear'], err => { |
97 | 98 | t.ifError(err) |
98 | | - t.equal(rimrafPath, '/fake/path/_cacache') |
| 99 | + t.equal(rimrafPath, path.join(npm.prefix, '_cacache')) |
99 | 100 | t.end() |
100 | 101 | }) |
101 | 102 | }) |
@@ -168,7 +169,7 @@ t.test('cache verify', t => { |
168 | 169 | cache(['verify'], err => { |
169 | 170 | t.ifError(err) |
170 | 171 | t.match(outputOutput, [ |
171 | | - 'Cache verified and compressed (/fake/path/_cacache)', |
| 172 | + `Cache verified and compressed (${path.join(npm.cache, '_cacache')})`, |
172 | 173 | 'Content verified: 1 (100 bytes)', |
173 | 174 | 'Index entries: 1', |
174 | 175 | 'Finished in 2s' |
@@ -196,7 +197,7 @@ t.test('cache verify w/ extra output', t => { |
196 | 197 | cache(['check'], err => { |
197 | 198 | t.ifError(err) |
198 | 199 | t.match(outputOutput, [ |
199 | | - 'Cache verified and compressed (~/fake/path/_cacache)', |
| 200 | + `Cache verified and compressed (${path.join(npm.cache, '_cacache')})`, |
200 | 201 | 'Content verified: 1 (100 bytes)', |
201 | 202 | 'Corrupted content removed: 1', |
202 | 203 | 'Content garbage-collected: 2 (200 bytes)', |
|
0 commit comments