]> gerrit.simantics Code Review - simantics/district.git/blobdiff - 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
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/async-some/test/base-case.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/async-some/test/base-case.js
new file mode 100644 (file)
index 0000000..3568905
--- /dev/null
@@ -0,0 +1,35 @@
+var test = require("tap").test
+
+var some = require("../some.js")
+
+test("some() array base case", function (t) {
+  some([], failer, function (error, match) {
+    t.ifError(error, "ran successfully")
+
+    t.notOk(match, "nothing to find, so nothing found")
+
+    t.end()
+  })
+
+  function failer(value, cb) {
+    cb(new Error("test should never have been called"))
+  }
+})
+
+test("some() arguments arraylike base case", function (t) {
+  go()
+
+  function go() {
+    some(arguments, failer, function (error, match) {
+      t.ifError(error, "ran successfully")
+
+      t.notOk(match, "nothing to find, so nothing found")
+
+      t.end()
+    })
+
+    function failer(value, cb) {
+      cb(new Error("test should never have been called"))
+    }
+  }
+})