]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/async-some/test/parameters.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / async-some / test / parameters.js
1 var test = require("tap").test
2
3 var some = require("../some.js")
4
5 var NOP = function () {}
6
7 test("some() called with bogus parameters", function (t) {
8   t.throws(function () {
9     some()
10   }, "throws when called with no parameters")
11
12   t.throws(function () {
13     some(null, NOP, NOP)
14   }, "throws when called with no list")
15
16   t.throws(function () {
17     some([], null, NOP)
18   }, "throws when called with no predicate")
19
20   t.throws(function () {
21     some([], NOP, null)
22   }, "throws when called with no callback")
23
24   t.throws(function () {
25     some({}, NOP, NOP)
26   }, "throws when called with wrong list type")
27
28   t.throws(function () {
29     some([], "ham", NOP)
30   }, "throws when called with wrong test type")
31
32   t.throws(function () {
33     some([], NOP, "ham")
34   }, "throws when called with wrong test type")
35
36   t.end()
37 })