You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
406 B

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