summaryrefslogtreecommitdiff
path: root/deps/npm/test/tap/cache-eacces-error-message.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/tap/cache-eacces-error-message.js')
-rw-r--r--deps/npm/test/tap/cache-eacces-error-message.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/deps/npm/test/tap/cache-eacces-error-message.js b/deps/npm/test/tap/cache-eacces-error-message.js
deleted file mode 100644
index fe76875c3e..0000000000
--- a/deps/npm/test/tap/cache-eacces-error-message.js
+++ /dev/null
@@ -1,35 +0,0 @@
-const npm = require('../../lib/npm.js')
-const t = require('tap')
-
-const common = require('../common-tap.js')
-
-common.skipIfWindows('this is a unix-only thing')
-
-const errorMessage = require('../../lib/utils/error-message.js')
-
-t.plan(1)
-
-npm.load({ cache: common.cache }, () => {
- npm.config.set('cache', common.cache)
- const er = new Error('access is e, i am afraid')
- er.code = 'EACCES'
- er.errno = -13
- er.path = common.cache + '/src'
- er.dest = common.cache + '/to'
-
- t.match(errorMessage(er), {
- summary: [
- [
- '',
- new RegExp('\n' +
- 'Your cache folder contains root-owned files, due to a bug in\n' +
- 'previous versions of npm which has since been addressed.\n' +
- '\n' +
- 'To permanently fix this problem, please run:\n' +
- ' sudo chown -R [0-9]+:[0-9]+ ".*npm_cache_cache-eacces-error-message"'
- )
- ]
- ],
- detail: []
- }, 'get the helpful error message')
-})