mirror of
https://github.com/nodejs/node.git
synced 2025-05-16 14:23:58 +00:00

Contains the following three npm releases: https://github.com/npm/npm/releases/tag/v3.8.7 https://github.com/npm/npm/releases/tag/v3.8.8 https://github.com/npm/npm/releases/tag/v3.8.9 PR-URL: https://github.com/nodejs/node/pull/6664 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
17 lines
405 B
JavaScript
17 lines
405 B
JavaScript
var test = require('tap').test
|
|
|
|
var vacuum = require('../vacuum.js')
|
|
|
|
test('vacuum errors when base is set and path is not under it', function (t) {
|
|
vacuum('/a/made/up/path', {base: '/root/elsewhere'}, function (er) {
|
|
t.ok(er, 'got an error')
|
|
t.equal(
|
|
er.message,
|
|
'/a/made/up/path is not a child of /root/elsewhere',
|
|
'got the expected error message'
|
|
)
|
|
|
|
t.end()
|
|
})
|
|
})
|