]> 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/base-case.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 / base-case.js
1 var test = require("tap").test
2
3 var some = require("../some.js")
4
5 test("some() array base case", function (t) {
6   some([], failer, function (error, match) {
7     t.ifError(error, "ran successfully")
8
9     t.notOk(match, "nothing to find, so nothing found")
10
11     t.end()
12   })
13
14   function failer(value, cb) {
15     cb(new Error("test should never have been called"))
16   }
17 })
18
19 test("some() arguments arraylike base case", function (t) {
20   go()
21
22   function go() {
23     some(arguments, failer, function (error, match) {
24       t.ifError(error, "ran successfully")
25
26       t.notOk(match, "nothing to find, so nothing found")
27
28       t.end()
29     })
30
31     function failer(value, cb) {
32       cb(new Error("test should never have been called"))
33     }
34   }
35 })