• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1var test = require('tap').test
2
3var vacuum = require('../vacuum.js')
4
5test('vacuum errors when base is set and path is not under it', function (t) {
6  vacuum('/a/made/up/path', {base: '/root/elsewhere'}, function (er) {
7    t.ok(er, 'got an error')
8    t.equal(
9      er.message,
10      '/a/made/up/path is not a child of /root/elsewhere',
11      'got the expected error message'
12    )
13
14    t.end()
15  })
16})
17