Skip to content

Commit

Permalink
test: fix cache tests in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Nov 4, 2020
1 parent 3b08c78 commit b49813e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/lib/cache.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const t = require('tap')
const requireInject = require('require-inject')
const path = require('path')

const usageUtil = () => 'usage instructions'

Expand Down Expand Up @@ -95,7 +96,7 @@ t.test('cache clean (force)', t => {

cache(['clear'], err => {
t.ifError(err)
t.equal(rimrafPath, '/fake/path/_cacache')
t.equal(rimrafPath, path.join(npm.prefix, '_cacache'))
t.end()
})
})
Expand Down Expand Up @@ -168,7 +169,7 @@ t.test('cache verify', t => {
cache(['verify'], err => {
t.ifError(err)
t.match(outputOutput, [
'Cache verified and compressed (/fake/path/_cacache)',
`Cache verified and compressed (${path.join(npm.cache, '_cacache')})`,
'Content verified: 1 (100 bytes)',
'Index entries: 1',
'Finished in 2s'
Expand Down Expand Up @@ -196,7 +197,7 @@ t.test('cache verify w/ extra output', t => {
cache(['check'], err => {
t.ifError(err)
t.match(outputOutput, [
'Cache verified and compressed (~/fake/path/_cacache)',
`Cache verified and compressed (${path.join(npm.cache, '_cacache')})`,
'Content verified: 1 (100 bytes)',
'Corrupted content removed: 1',
'Content garbage-collected: 2 (200 bytes)',
Expand Down

0 comments on commit b49813e

Please sign in to comment.