mirror of https://github.com/lukechilds/node.git
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.
17 lines
406 B
17 lines
406 B
11 years ago
|
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()
|
||
|
})
|
||
|
})
|