]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/fs-vacuum/test/base-leaf-mismatch.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / fs-vacuum / test / base-leaf-mismatch.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/fs-vacuum/test/base-leaf-mismatch.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/fs-vacuum/test/base-leaf-mismatch.js
new file mode 100644 (file)
index 0000000..1a6c535
--- /dev/null
@@ -0,0 +1,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()
+  })
+})