]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/fs-vacuum/test/arguments.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 / arguments.js
1 var test = require('tap').test
2
3 var vacuum = require('../vacuum.js')
4
5 test('vacuum throws on missing parameters', function (t) {
6   t.throws(vacuum, 'called with no parameters')
7   t.throws(function () { vacuum('directory', {}) }, 'called with no callback')
8
9   t.end()
10 })
11
12 test('vacuum throws on incorrect types ("Forrest is pedantic" section)', function (t) {
13   t.throws(function () {
14     vacuum({}, {}, function () {})
15   }, 'called with path parameter of incorrect type')
16   t.throws(function () {
17     vacuum('directory', 'directory', function () {})
18   }, 'called with options of wrong type')
19   t.throws(function () {
20     vacuum('directory', {}, 'whoops')
21   }, "called with callback that isn't callable")
22
23   t.end()
24 })