node/deps/npm/node_modules/fs-vacuum/test/base-leaf-mismatch.js
Rebecca Turner 5c36cfc843 deps: upgrade npm to 3.8.9
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>
2016-05-10 14:45:28 -04:00

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()
})
})