blob: cfdf074fe43b96a70fb4e2416f5cbd04c7c5d6c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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()
})
})
|